BlobTransferClient.DownloadBlob Method (Uri, String, FileEncryption, UInt64, CancellationToken, IRetryPolicy)

Downloads the specified blob to the specified location.

Namespace:  Microsoft.WindowsAzure.MediaServices.Client
Assembly:  Microsoft.WindowsAzure.MediaServices.Client (in Microsoft.WindowsAzure.MediaServices.Client.dll)


Public Function DownloadBlob ( _
    uri As Uri, _
    localFile As String, _
    fileEncryption As FileEncryption, _
    initializationVector As ULong, _
    cancellationToken As CancellationToken, _
    retryPolicy As IRetryPolicy _
) As Task
Dim instance As BlobTransferClient 
Dim uri As Uri 
Dim localFile As String 
Dim fileEncryption As FileEncryption 
Dim initializationVector As ULong 
Dim cancellationToken As CancellationToken 
Dim retryPolicy As IRetryPolicy 
Dim returnValue As Task 

returnValue = instance.DownloadBlob(uri, _
    localFile, fileEncryption, initializationVector, _
    cancellationToken, retryPolicy)
public Task DownloadBlob(
    Uri uri,
    string localFile,
    FileEncryption fileEncryption,
    ulong initializationVector,
    CancellationToken cancellationToken,
    IRetryPolicy retryPolicy
Task^ DownloadBlob(
    Uri^ uri, 
    String^ localFile, 
    FileEncryption^ fileEncryption, 
    unsigned long long initializationVector, 
    CancellationToken cancellationToken, 
    IRetryPolicy^ retryPolicy
member DownloadBlob : 
        uri:Uri * 
        localFile:string * 
        fileEncryption:FileEncryption * 
        initializationVector:uint64 * 
        cancellationToken:CancellationToken * 
        retryPolicy:IRetryPolicy -> Task
public function DownloadBlob(
    uri : Uri, 
    localFile : String, 
    fileEncryption : FileEncryption, 
    initializationVector : ulong, 
    cancellationToken : CancellationToken, 
    retryPolicy : IRetryPolicy
) : Task


  • uri
    Type: System.Uri
    The blob URL from which file a needs should be downloaded. If blob has private read permissions then an appropriate SAS URL need to be passed.
  • localFile
    Type: System.String
    The full path where file will be saved.
  • initializationVector
    Type: System.UInt64
    The initialization vector if encryption has been used.
  • retryPolicy
    Type: IRetryPolicy
    The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy. RetryPolicies class can be used to get default policies.

Return Value

Type: System.Threading.Tasks.Task
Returns Task.

See Also


BlobTransferClient Class

DownloadBlob Overload

Microsoft.WindowsAzure.MediaServices.Client Namespace