Επεξεργασία

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


HttpContent.SerializeToStreamAsync Method

Definition

Overloads

SerializeToStreamAsync(Stream, TransportContext)

Serialize the HTTP content to a stream as an asynchronous operation.

SerializeToStreamAsync(Stream, TransportContext, CancellationToken)

Serialize the HTTP content to a stream as an asynchronous operation.

SerializeToStreamAsync(Stream, TransportContext)

Source:
HttpContent.cs
Source:
HttpContent.cs
Source:
HttpContent.cs

Serialize the HTTP content to a stream as an asynchronous operation.

protected:
 abstract System::Threading::Tasks::Task ^ SerializeToStreamAsync(System::IO::Stream ^ stream, System::Net::TransportContext ^ context);
protected abstract System.Threading.Tasks.Task SerializeToStreamAsync (System.IO.Stream stream, System.Net.TransportContext context);
protected 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
Protected MustOverride Function SerializeToStreamAsync (stream As Stream, context As TransportContext) As 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

SerializeToStreamAsync(Stream, TransportContext, CancellationToken)

Source:
HttpContent.cs
Source:
HttpContent.cs
Source:
HttpContent.cs

Serialize the HTTP content to a stream as an asynchronous operation.

protected:
 virtual System::Threading::Tasks::Task ^ SerializeToStreamAsync(System::IO::Stream ^ stream, System::Net::TransportContext ^ context, System::Threading::CancellationToken cancellationToken);
protected virtual System.Threading.Tasks.Task SerializeToStreamAsync (System.IO.Stream stream, System.Net.TransportContext? context, System.Threading.CancellationToken cancellationToken);
abstract member SerializeToStreamAsync : System.IO.Stream * System.Net.TransportContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.SerializeToStreamAsync : System.IO.Stream * System.Net.TransportContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function SerializeToStreamAsync (stream As Stream, context As TransportContext, cancellationToken As CancellationToken) As Task

Parameters

stream
Stream

The target stream.

context
TransportContext

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

cancellationToken
CancellationToken

The cancellation token to cancel the operation.

Returns

The task object representing the asynchronous operation.

Exceptions

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

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