HttpContent.SerializeToStreamAsync(Stream, TransportContext) 方法

定義

以非同步作業方式將 HTTP 內容序列化為資料流。Serialize the HTTP content to a stream as an asynchronous operation.

protected public:
 abstract System::Threading::Tasks::Task ^ SerializeToStreamAsync(System::IO::Stream ^ stream, System::Net::TransportContext ^ context);
protected internal abstract System.Threading.Tasks.Task SerializeToStreamAsync (System.IO.Stream stream, System.Net.TransportContext context);
abstract member SerializeToStreamAsync : System.IO.Stream * System.Net.TransportContext -> System.Threading.Tasks.Task

參數

stream
Stream

目標資料流。The target stream.

context
TransportContext

傳輸的相關資訊 (例如通道繫結權杖)。Information about the transport (channel binding token, for example). 此參數可以是 nullThis parameter may be null.

傳回

工作物件,表示非同步作業。The task object representing the asynchronous operation.

備註

這項作業不會封鎖。This operation will not block. 傳回Task<TResult>的物件會在所有內容都已序列化為stream參數中傳遞的資料流程物件後完成。The returned Task<TResult> object will complete after all of the content has been serialized to the stream object passed in the stream parameter.

適用於