Επεξεργασία

Κοινή χρήση μέσω


MultipartContent.CreateContentReadStream(CancellationToken) Method

Definition

Serializes the HTTP content to a stream using the multipart/* encoding.

protected:
 override System::IO::Stream ^ CreateContentReadStream(System::Threading::CancellationToken cancellationToken);
protected override System.IO.Stream CreateContentReadStream (System.Threading.CancellationToken cancellationToken);
override this.CreateContentReadStream : System.Threading.CancellationToken -> System.IO.Stream
Protected Overrides Function CreateContentReadStream (cancellationToken As CancellationToken) As Stream

Parameters

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

The HTTP content stream that represents the multipart/* encoded HTTP content.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method overrides HttpContent.CreateContentReadStream to use a custom stream that contains an array, with each HTTP content entity and its boundary encoded and serialized to a MemoryStream instance.

Applies to