PipeWriter.CopyFromAsync(Stream, CancellationToken) Método

Definição

Lê de forma assíncrona os bytes do fluxo especificado e os grava no PipeWriter.Asynchronously reads the bytes from the specified stream and writes them to the PipeWriter.

protected internal virtual System.Threading.Tasks.Task CopyFromAsync (System.IO.Stream source, System.Threading.CancellationToken cancellationToken = default);
abstract member CopyFromAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.CopyFromAsync : System.IO.Stream * System.Threading.CancellationToken -> System.Threading.Tasks.Task

Parâmetros

source
Stream

O fluxo do qual o conteúdo será copiado.The stream from which the contents will be copied.

cancellationToken
CancellationToken

O token para monitorar quanto às solicitações de cancelamento.The token to monitor for cancellation requests. O valor padrão é None.The default value is None.

Retornos

Uma tarefa que representa a operação de cópia assíncrona.A task that represents the asynchronous copy operation.

Aplica-se a