Share via


BlockBlobClient.StageBlockAsync Methode

Definition

Der StageBlockAsync(String, Stream, BlockBlobStageBlockOptions, CancellationToken) Vorgang erstellt einen neuen Block als Teil des "Stagingbereichs" eines Blockblobs, der schließlich über den CommitBlockListAsync(IEnumerable<String>, CommitBlockListOptions, CancellationToken) Vorgang committet werden soll.

Weitere Informationen finden Sie unter Put Block.

public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>> StageBlockAsync (string base64BlockId, System.IO.Stream content, Azure.Storage.Blobs.Models.BlockBlobStageBlockOptions options = default, System.Threading.CancellationToken cancellationToken = default);
abstract member StageBlockAsync : string * System.IO.Stream * Azure.Storage.Blobs.Models.BlockBlobStageBlockOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>>
override this.StageBlockAsync : string * System.IO.Stream * Azure.Storage.Blobs.Models.BlockBlobStageBlockOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Blobs.Models.BlockInfo>>
Public Overridable Function StageBlockAsync (base64BlockId As String, content As Stream, Optional options As BlockBlobStageBlockOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Response(Of BlockInfo))

Parameter

base64BlockId
String

Ein gültiger Base64-Zeichenfolgenwert, der den Block bezeichnet. Vor der Codierung muss die Zeichenfolge kleiner oder gleich 64 Bytes sein.

Für ein bestimmtes Blob muss die Länge des für den blockid-Parameter angegebenen Werts die gleiche Größe für jeden Block haben. Beachten Sie, dass die Base64-Zeichenfolge codiert sein muss.

content
Stream

Ein Stream , der den hochzuladenden Inhalt enthält.

options
BlockBlobStageBlockOptions

Optionale Parameter.

cancellationToken
CancellationToken

Optional CancellationToken zur Weitergabe von Benachrichtigungen, dass der Vorgang abgebrochen werden soll.

Gibt zurück

Eine Response<T> , die den Status des aktualisierten Blocks beschreibt.

Hinweise

Ein RequestFailedException wird ausgelöst, wenn ein Fehler auftritt.

Gilt für: