C# Class Microsoft.WindowsAzure.MediaServices.Client.BlobTransferClient

Represents a client to operate on Windows Azure Blobs.
Mostra file Open project: Azure/azure-sdk-for-media-services Class Usage Examples

Public Methods

Method Description
BlobTransferClient ( System.TimeSpan forceSharedAccessSignatureRetry = default(TimeSpan) ) : System

Constructs a BlobTransferClient object.

DownloadBlob ( Uri uri, string localFile, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, ulong initializationVector, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null ) : Task

Downloads the specified blob to the specified location.

DownloadBlob ( Uri uri, string localFile, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, ulong initializationVector, Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient client, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null, long start, long length = -1 ) : Task

Downloads the specified blob to the specified location.

UploadBlob ( Uri url, string localFile, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient client, IRetryPolicy retryPolicy, string contentType = null, string subDirectory = "", Func getSharedAccessSignature = null ) : Task

Uploads file to a blob storage.

UploadBlob ( Uri url, string name, Stream stream, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient client, IRetryPolicy retryPolicy, string contentType = null, string subDirectory = "", Func getSharedAccessSignature = null ) : Task

Uploads a stream to a blob storage.

UploadBlob ( Uri url, string name, Stream stream, string contentType, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null ) : Task

Uploads stream to a blob storage.

UploadBlob ( Uri url, string localFile, string contentType, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null ) : Task

Uploads file to a blob storage.

Method Details

BlobTransferClient() public method

Constructs a BlobTransferClient object.
public BlobTransferClient ( System.TimeSpan forceSharedAccessSignatureRetry = default(TimeSpan) ) : System
forceSharedAccessSignatureRetry System.TimeSpan
return System

DownloadBlob() public method

Downloads the specified blob to the specified location.
public DownloadBlob ( Uri uri, string localFile, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, ulong initializationVector, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null ) : Task
uri System.Uri The blob url from which file needs to be downloaded.If blob has private read permissions then appropriate sas url need to be passed
localFile string The full path where file will be saved
fileEncryption Microsoft.WindowsAzure.MediaServices.Client.FileEncryption The file encryption if file has been encrypted. Pass null if no encryption has been used
initializationVector ulong The initialization vector if encryption has been used.
cancellationToken System.Threading.CancellationToken The cancellation token.
retryPolicy IRetryPolicy The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy.RetryPolicies class can bee used to get default policies
getSharedAccessSignature Func A callback function which returns Sas signature for the file to be downloaded
return Task

DownloadBlob() public method

Downloads the specified blob to the specified location.
public DownloadBlob ( Uri uri, string localFile, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, ulong initializationVector, Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient client, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null, long start, long length = -1 ) : Task
uri 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 string The full path where file will be saved.
fileEncryption Microsoft.WindowsAzure.MediaServices.Client.FileEncryption The file encryption if file has been encrypted. Pass null if no encryption has been used.
initializationVector ulong The initialization vector if encryption has been used.
client Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient The azure client to access a blob.
cancellationToken System.Threading.CancellationToken The cancellation token to cancel the download operation.
retryPolicy IRetryPolicy The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy.RetryPolicies class can bee used to get default policies
getSharedAccessSignature Func A callback function which returns Sas signature for the file to be downloaded
start long Start pos to download
length long Number of bytes to download, -1 to download all.
return Task

UploadBlob() public method

Uploads file to a blob storage.
public UploadBlob ( Uri url, string localFile, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient client, IRetryPolicy retryPolicy, string contentType = null, string subDirectory = "", Func getSharedAccessSignature = null ) : Task
url System.Uri The URL where file needs to be uploaded.If blob has private write permissions then appropriate sas url need to be passed
localFile string The full path of local file.
fileEncryption Microsoft.WindowsAzure.MediaServices.Client.FileEncryption The file encryption if file needs to be stored encrypted. Pass null if no encryption required
cancellationToken System.Threading.CancellationToken The cancellation token.
client Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient The client which will be used to upload file. Use client if request need to be signed with client credentials. When upload performed using Sas url, /// then client can be null
retryPolicy IRetryPolicy The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy.RetryPolicies class can bee used to get default policies
contentType string Content type of the blob
subDirectory string Virtual subdirectory for this file in the blog container.
getSharedAccessSignature Func A callback function which returns Sas signature for the file to be downloaded
return Task

UploadBlob() public method

Uploads a stream to a blob storage.
public UploadBlob ( Uri url, string name, Stream stream, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient client, IRetryPolicy retryPolicy, string contentType = null, string subDirectory = "", Func getSharedAccessSignature = null ) : Task
url System.Uri The URL where file needs to be uploaded.If blob has private write permissions then appropriate sas url need to be passed
name string Name for the stream
stream Stream Stream to be uploaded
fileEncryption Microsoft.WindowsAzure.MediaServices.Client.FileEncryption The file encryption if file needs to be stored encrypted. Pass null if no encryption required
cancellationToken System.Threading.CancellationToken The cancellation token.
client Microsoft.WindowsAzure.Storage.Blob.CloudBlobClient The client which will be used to upload file. Use client if request need to be signed with client credentials. When upload performed using Sas url, /// then client can be null
retryPolicy IRetryPolicy The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy.RetryPolicies class can bee used to get default policies
contentType string Content type of the blob
subDirectory string Virtual subdirectory for this file in the blog container.
getSharedAccessSignature Func A callback function which returns Sas signature for the file to be downloaded
return Task

UploadBlob() public method

Uploads stream to a blob storage.
public UploadBlob ( Uri url, string name, Stream stream, string contentType, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null ) : Task
url System.Uri The URL where file needs to be uploaded. If blob has private write permissions then /// appropriate sas url need to be passed
name string Name for the stream
stream Stream Stream to be uploaded
contentType string Content type of the blob
fileEncryption Microsoft.WindowsAzure.MediaServices.Client.FileEncryption The file encryption if file needs to be stored encrypted. Pass null if no encryption required
cancellationToken System.Threading.CancellationToken The cancellation token.
retryPolicy IRetryPolicy The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy.RetryPolicies class can bee used to get default policies
getSharedAccessSignature Func A callback function which returns Sas signature for the file to be downloaded
return Task

UploadBlob() public method

Uploads file to a blob storage.
public UploadBlob ( Uri url, string localFile, string contentType, Microsoft.WindowsAzure.MediaServices.Client.FileEncryption fileEncryption, CancellationToken cancellationToken, IRetryPolicy retryPolicy, Func getSharedAccessSignature = null ) : Task
url System.Uri The URL where file needs to be uploaded. If blob has private write permissions then /// appropriate sas url need to be passed
localFile string The full path of local file.
contentType string Content type of the blob
fileEncryption Microsoft.WindowsAzure.MediaServices.Client.FileEncryption The file encryption if file needs to be stored encrypted. Pass null if no encryption required
cancellationToken System.Threading.CancellationToken The cancellation token.
retryPolicy IRetryPolicy The RetryPolicy delegate returns a ShouldRetry delegate, which can be used to implement a custom retry policy.RetryPolicies class can bee used to get default policies
getSharedAccessSignature Func A callback function which returns Sas signature for the file to be downloaded
return Task