HttpContent.SerializeToStreamAsync(Stream, TransportContext) Method

Definition

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

Parameters

stream
Stream

The target stream.

context
TransportContext

Information about the transport (channel binding token, for example). This parameter may be null.

Returns

The task object representing the asynchronous operation.

Remarks

This operation will not block. The returned Task<TResult> object will complete after all of the content has been serialized to the stream object passed in the stream parameter.

Applies to