StreamContent.SerializeToStream(Stream, TransportContext, CancellationToken) 方法

定义

将多部分 HTTP 内容序列化为流。Serializes the multipart HTTP content to a stream.

protected:
 override void SerializeToStream(System::IO::Stream ^ stream, System::Net::TransportContext ^ context, System::Threading::CancellationToken cancellationToken);
protected override void SerializeToStream (System.IO.Stream stream, System.Net.TransportContext? context, System.Threading.CancellationToken cancellationToken);
override this.SerializeToStream : System.IO.Stream * System.Net.TransportContext * System.Threading.CancellationToken -> unit
Protected Overrides Sub SerializeToStream (stream As Stream, context As TransportContext, cancellationToken As CancellationToken)

参数

stream
Stream

目标流。The target stream.

context
TransportContext

有关传输的信息(例如通道绑定令牌)。Information about the transport (for example, the channel binding token). 此参数可以为 nullThis parameter may be null.

cancellationToken
CancellationToken

用于取消操作的取消令牌。The cancellation token to cancel the operation.

适用于