ByteArrayContent.SerializeToStreamAsync(Stream, TransportContext) Method

Definition

Serialize and write the byte array provided in the constructor to an HTTP content stream as an asynchronous operation.

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

Parameters

stream
Stream

The target stream.

context
TransportContext

Information about the transport, like channel binding token. This parameter may be null.

Returns

The task object representing the asynchronous operation.

Remarks

This operation does not block. When the returned Task object completes, the whole byte array has been written to the stream parameter.

Applies to