Partilhar via


OutputFileReference.DownloadToByteArrayAsync Método

Definição

Baixa o conteúdo do arquivo em uma matriz de bytes.

public System.Threading.Tasks.Task<int> DownloadToByteArrayAsync(byte[] target, int index, System.Threading.CancellationToken cancellationToken = default);
member this.DownloadToByteArrayAsync : byte[] * int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<int>
Public Function DownloadToByteArrayAsync (target As Byte(), index As Integer, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Integer)

Parâmetros

target
Byte[]

A matriz de bytes de destino.

index
Int32

O deslocamento inicial na matriz de bytes

cancellationToken
CancellationToken

Um CancellationToken para controlar o tempo de vida da operação assíncrona.

Retornos

O número total de bytes lidos do buffer.

Aplica-se a

Confira também