FormUrlEncodedContent.SerializeToStreamAsync Metodo

Definizione

Serializzare e scrivere tutte le tuple nome/valore fornite nel costruttore in un flusso di contenuto HTTP come operazione asincrona.

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

Parametri

stream
Stream

Flusso di destinazione.

context
TransportContext

Informazioni sul trasporto, ad esempio il token di associazione del canale. Questo parametro può essere null.

cancellationToken
CancellationToken

Token di annullamento per annullare l'operazione.

Valori restituiti

Oggetto attività che rappresenta l'operazione asincrona.

Eccezioni

Il token di annullamento è stato annullato. Questa eccezione viene archiviata nell'attività restituita.

Commenti

Questa operazione non si blocca. Al termine dell'oggetto restituito Task , tutte le tuple nome/valore sono state scritte nel stream parametro .

Si applica a