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

定义

将构造函数中提供的字节数组序列化并写入一个 HTTP 内容流。Serializes and writes the byte array provided in the constructor to an HTTP content 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

有关传输的可选信息,例如通道绑定令牌。Optional information about the transport, like the channel binding token. 此参数可以为 nullThis parameter can be null.

cancellationToken
CancellationToken

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

适用于