HttpContent.SerializeToStreamAsync Método

Definição

Sobrecargas

SerializeToStreamAsync(Stream, TransportContext)

Serialize o conteúdo HTTP em um fluxo como uma operação assíncrona.Serialize the HTTP content to a stream as an asynchronous operation.

SerializeToStreamAsync(Stream, TransportContext, CancellationToken)

Serialize o conteúdo HTTP em um fluxo como uma operação assíncrona.Serialize the HTTP content to a stream as an asynchronous operation.

SerializeToStreamAsync(Stream, TransportContext)

Serialize o conteúdo HTTP em um fluxo como uma operação assíncrona.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 public:
 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);
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
Protected MustOverride Function SerializeToStreamAsync (stream As Stream, context As TransportContext) As Task
Protected Friend MustOverride Function SerializeToStreamAsync (stream As Stream, context As TransportContext) As Task

Parâmetros

stream
Stream

O fluxo de destino.The target stream.

context
TransportContext

Informações sobre o transporte (token da associação de canal, por exemplo).Information about the transport (channel binding token, for example). Esse parâmetro pode ser null.This parameter may be null.

Retornos

Task

O objeto de tarefa que representa a operação assíncrona.The task object representing the asynchronous operation.

Comentários

Esta operação não será bloqueada.This operation will not block. O Task<TResult> objeto retornado será concluído depois que todo o conteúdo tiver sido serializado para o objeto de fluxo passado no stream parâmetro.The returned Task<TResult> object will complete after all of the content has been serialized to the stream object passed in the stream parameter.

Aplica-se a

SerializeToStreamAsync(Stream, TransportContext, CancellationToken)

Serialize o conteúdo HTTP em um fluxo como uma operação assíncrona.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

Parâmetros

stream
Stream

O fluxo de destino.The target stream.

context
TransportContext

Informações sobre o transporte (token da associação de canal, por exemplo).Information about the transport (channel binding token, for example). Esse parâmetro pode ser null.This parameter may be null.

cancellationToken
CancellationToken

O token de cancelamento para cancelar a operação.The cancellation token to cancel the operation.

Retornos

Task

O objeto de tarefa que representa a operação assíncrona.The task object representing the asynchronous operation.

Comentários

Esta operação não será bloqueada.This operation will not block. O Task<TResult> objeto retornado será concluído depois que todo o conteúdo tiver sido serializado para o objeto de fluxo passado no stream parâmetro.The returned Task<TResult> object will complete after all of the content has been serialized to the stream object passed in the stream parameter.

Aplica-se a