Table of Contents

Class CloudBlockBlob

Namespace
Microsoft.WindowsAzure.Storage.Blob
Assembly
Microsoft.WindowsAzure.Storage.dll

Represents a blob that is uploaded as a set of blocks.

public class CloudBlockBlob : CloudBlob, ICloudBlob, IListBlobItem
Inheritance
CloudBlockBlob
Implements
Inherited Members

Constructors

CloudBlockBlob(StorageUri, DateTimeOffset?, StorageCredentials)

Initializes a new instance of the CloudBlockBlob class using an absolute URI to the blob.

public CloudBlockBlob(StorageUri blobAbsoluteUri, DateTimeOffset? snapshotTime, StorageCredentials credentials)

Parameters

blobAbsoluteUri StorageUri

A StorageUri containing the absolute URI to the blob at both the primary and secondary locations.

snapshotTime DateTimeOffset?

A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.

credentials StorageCredentials

A StorageCredentials object.

CloudBlockBlob(StorageUri, DateTimeOffset?, CloudBlobClient)

Initializes a new instance of the CloudBlockBlob class using an absolute URI to the blob.

public CloudBlockBlob(StorageUri blobAbsoluteUri, DateTimeOffset? snapshotTime, CloudBlobClient client)

Parameters

blobAbsoluteUri StorageUri

A StorageUri containing the absolute URI to the blob at both the primary and secondary locations.

snapshotTime DateTimeOffset?

A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.

client CloudBlobClient

A CloudBlobClient object.

CloudBlockBlob(Uri)

Initializes a new instance of the CloudBlockBlob class using an absolute URI to the blob.

public CloudBlockBlob(Uri blobAbsoluteUri)

Parameters

blobAbsoluteUri Uri

A System.Uri specifying the absolute URI to the blob.

CloudBlockBlob(Uri, StorageCredentials)

Initializes a new instance of the CloudBlockBlob class using an absolute URI to the blob.

public CloudBlockBlob(Uri blobAbsoluteUri, StorageCredentials credentials)

Parameters

blobAbsoluteUri Uri

A System.Uri specifying the absolute URI to the blob.

credentials StorageCredentials

A StorageCredentials object.

CloudBlockBlob(Uri, CloudBlobClient)

Initializes a new instance of the CloudBlockBlob class using an absolute URI to the blob.

public CloudBlockBlob(Uri blobAbsoluteUri, CloudBlobClient client)

Parameters

blobAbsoluteUri Uri

A System.Uri specifying the absolute URI to the blob.

client CloudBlobClient

A CloudBlobClient object.

CloudBlockBlob(Uri, DateTimeOffset?, StorageCredentials)

Initializes a new instance of the CloudBlockBlob class using an absolute URI to the blob.

public CloudBlockBlob(Uri blobAbsoluteUri, DateTimeOffset? snapshotTime, StorageCredentials credentials)

Parameters

blobAbsoluteUri Uri

A System.Uri specifying the absolute URI to the blob.

snapshotTime DateTimeOffset?

A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.

credentials StorageCredentials

A StorageCredentials object.

CloudBlockBlob(Uri, DateTimeOffset?, CloudBlobClient)

Initializes a new instance of the CloudBlockBlob class using an absolute URI to the blob.

public CloudBlockBlob(Uri blobAbsoluteUri, DateTimeOffset? snapshotTime, CloudBlobClient client)

Parameters

blobAbsoluteUri Uri

A System.Uri specifying the absolute URI to the blob.

snapshotTime DateTimeOffset?

A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.

client CloudBlobClient

A CloudBlobClient object.

Properties

StreamWriteSizeInBytes

Gets or sets the block size for writing to a block blob.

public int StreamWriteSizeInBytes { get; set; }

Property Value

int

The size of a block, in bytes, ranging from between 16 KB and 100 MB inclusive.

Methods

BeginCreateSnapshot(AsyncCallback, object)

Begins an asynchronous operation to create a snapshot of the blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateSnapshot(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginCreateSnapshot(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to create a snapshot of the blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateSnapshot(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

metadata IDictionary<string, string>

A collection of name-value pairs defining the metadata of the snapshot.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request, or null.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadBlockList(BlockListingFilter, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to return an enumerable collection of the blob's blocks, using the specified block list filter.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDownloadBlockList(BlockListingFilter blockListingFilter, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

blockListingFilter BlockListingFilter

A BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadBlockList(AsyncCallback, object)

Begins an asynchronous operation to return an enumerable collection of the blob's blocks, using the specified block list filter.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDownloadBlockList(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadText(AsyncCallback, object)

Begins an asynchronous operation to download the blob's contents as a string.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDownloadText(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginDownloadText(Encoding, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to download the blob's contents as a string.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginDownloadText(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

encoding Encoding

An object that indicates the text encoding to use.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginOpenWrite(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginOpenWrite(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Remarks

Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().

BeginOpenWrite(AsyncCallback, object)

Begins an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginOpenWrite(AsyncCallback callback, object state)

Parameters

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Remarks

Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, see BeginOpenWrite(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).

BeginPutBlock(string, Stream, string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginPutBlock(string blockId, Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request, or null. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

BeginPutBlock(string, Stream, string, AsyncCallback, object)

Begins an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginPutBlock(string blockId, Stream blockData, string contentMD5, AsyncCallback callback, object state)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

BeginPutBlock(string, Uri, long?, long?, string, AsyncCallback, object)

Begins an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginPutBlock(string blockId, Uri sourceUri, long? offset, long? count, string contentMD5, AsyncCallback callback, object state)

Parameters

blockId string

A Base64-encoded string that identifies the block.

sourceUri Uri

A System.Uri specifying the absolute URI to the source blob.

offset long?

The byte offset at which to begin returning content.

count long?

The number of bytes to return, or null to return all bytes through the end of the blob.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.

BeginPutBlockList(IEnumerable<string>, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a list of blocks to a new or existing blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginPutBlockList(IEnumerable<string> blockList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

blockList IEnumerable<string>

An enumerable collection of block IDs, as Base64-encoded strings.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginPutBlockList(IEnumerable<string>, AsyncCallback, object)

Begins an asynchronous operation to upload a list of blocks to a new or existing blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginPutBlockList(IEnumerable<string> blockList, AsyncCallback callback, object state)

Parameters

blockList IEnumerable<string>

An enumerable collection of block IDs, as Base64-encoded strings.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetStandardBlobTier(StandardBlobTier, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to set the tier of the blob on a standard storage account.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetStandardBlobTier(StandardBlobTier standardBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

standardBlobTier StandardBlobTier

A StandardBlobTier representing the tier to set.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request, or null.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginSetStandardBlobTier(StandardBlobTier, AsyncCallback, object)

Begins an asynchronous operation to set the tier of the blob on a standard storage account.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetStandardBlobTier(StandardBlobTier standardBlobTier, AsyncCallback callback, object state)

Parameters

standardBlobTier StandardBlobTier

A StandardBlobTier representing the tier to set.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginStartCopy(CloudBlockBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to start copying another block blob's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudBlockBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

source CloudBlockBlob

A CloudBlockBlob object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source blob. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginStartCopy(CloudBlockBlob, AsyncCallback, object)

Begins an asynchronous operation to start copying another block blob's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudBlockBlob source, AsyncCallback callback, object state)

Parameters

source CloudBlockBlob

A CloudBlockBlob object.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginStartCopy(CloudFile, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to start copying a file's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudFile source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

source CloudFile

A CloudFile object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source file. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginStartCopy(CloudFile, AsyncCallback, object)

Begins an asynchronous operation to start copying a file's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudFile source, AsyncCallback callback, object state)

Parameters

source CloudFile

A CloudFile object.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromByteArray(byte[], int, int, AsyncCallback, object)

Begins an asynchronous operation to upload the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromFile(string, AsyncCallback, object)

Begins an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AsyncCallback callback, object state)

Parameters

path string

A string containing the file path providing the blob content.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadFromStream(Stream, long, AsyncCallback, object)

Begins an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadText(string, AsyncCallback, object)

Begins an asynchronous operation to upload a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadText(string content, AsyncCallback callback, object state)

Parameters

content string

A string containing the text to upload.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

BeginUploadText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)

Begins an asynchronous operation to upload a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadText(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)

Parameters

content string

A string containing the text to upload.

encoding Encoding

A Encoding object that indicates the text encoding to use. If null, UTF-8 will be used.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

callback AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state object

A user-defined object that will be passed to the callback delegate.

Returns

ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

CreateSnapshot(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext)

Creates a snapshot of the blob.

[DoesServiceRequest]
public virtual CloudBlockBlob CreateSnapshot(IDictionary<string, string> metadata = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

metadata IDictionary<string, string>

A collection of name-value pairs defining the metadata of the snapshot.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request, or null. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

CloudBlockBlob

A CloudBlockBlob object that is a blob snapshot.

CreateSnapshotAsync()

Initiates an asynchronous operation to create a snapshot of the blob.

[DoesServiceRequest]
public virtual Task<CloudBlockBlob> CreateSnapshotAsync()

Returns

Task<CloudBlockBlob>

A Task<TResult> object of type CloudBlockBlob that represents the asynchronous operation.

CreateSnapshotAsync(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to create a snapshot of the blob.

[DoesServiceRequest]
public virtual Task<CloudBlockBlob> CreateSnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

metadata IDictionary<string, string>

A collection of name-value pairs defining the metadata of the snapshot.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<CloudBlockBlob>

A Task<TResult> object of type CloudBlockBlob that represents the asynchronous operation.

CreateSnapshotAsync(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to create a snapshot of the blob.

[DoesServiceRequest]
public virtual Task<CloudBlockBlob> CreateSnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

metadata IDictionary<string, string>

A collection of name-value pairs defining the metadata of the snapshot.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<CloudBlockBlob>

A Task<TResult> object of type CloudBlockBlob that represents the asynchronous operation.

CreateSnapshotAsync(CancellationToken)

Initiates an asynchronous operation to create a snapshot of the blob.

[DoesServiceRequest]
public virtual Task<CloudBlockBlob> CreateSnapshotAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<CloudBlockBlob>

A Task<TResult> object of type CloudBlockBlob that represents the asynchronous operation.

DownloadBlockList(BlockListingFilter, AccessCondition, BlobRequestOptions, OperationContext)

Returns an enumerable collection of the blob's blocks, using the specified block list filter.

[DoesServiceRequest]
public virtual IEnumerable<ListBlockItem> DownloadBlockList(BlockListingFilter blockListingFilter = BlockListingFilter.Committed, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

blockListingFilter BlockListingFilter

A BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

IEnumerable<ListBlockItem>

An enumerable collection of objects implementing ListBlockItem.

DownloadBlockListAsync()

Initiates an asynchronous operation to return an enumerable collection of the blob's blocks, using the specified block list filter.

[DoesServiceRequest]
public virtual Task<IEnumerable<ListBlockItem>> DownloadBlockListAsync()

Returns

Task<IEnumerable<ListBlockItem>>

A Task<TResult> object that is an enumerable collection of type ListBlockItem that represents the asynchronous operation.

DownloadBlockListAsync(BlockListingFilter, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to return an enumerable collection of the blob's blocks, using the specified block list filter.

[DoesServiceRequest]
public virtual Task<IEnumerable<ListBlockItem>> DownloadBlockListAsync(BlockListingFilter blockListingFilter, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

blockListingFilter BlockListingFilter

A BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<IEnumerable<ListBlockItem>>

A Task<TResult> object that is an enumerable collection of type ListBlockItem that represents the asynchronous operation.

DownloadBlockListAsync(BlockListingFilter, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to return an enumerable collection of the blob's blocks, using the specified block list filter.

[DoesServiceRequest]
public virtual Task<IEnumerable<ListBlockItem>> DownloadBlockListAsync(BlockListingFilter blockListingFilter, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

blockListingFilter BlockListingFilter

A BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<IEnumerable<ListBlockItem>>

A Task<TResult> object that is an enumerable collection of type ListBlockItem that represents the asynchronous operation.

DownloadBlockListAsync(CancellationToken)

Initiates an asynchronous operation to return an enumerable collection of the blob's blocks, using the specified block list filter.

[DoesServiceRequest]
public virtual Task<IEnumerable<ListBlockItem>> DownloadBlockListAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<IEnumerable<ListBlockItem>>

A Task<TResult> object that is an enumerable collection of type ListBlockItem that represents the asynchronous operation.

DownloadText(Encoding, AccessCondition, BlobRequestOptions, OperationContext)

Downloads the blob's contents as a string.

[DoesServiceRequest]
public virtual string DownloadText(Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

encoding Encoding

An object that indicates the text encoding to use.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

string

The contents of the blob, as a string.

DownloadTextAsync()

Initiates an asynchronous operation to download the blob's contents as a string.

[DoesServiceRequest]
public virtual Task<string> DownloadTextAsync()

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

DownloadTextAsync(Encoding, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to download the blob's contents as a string.

[DoesServiceRequest]
public virtual Task<string> DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

encoding Encoding

An object that indicates the text encoding to use.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

DownloadTextAsync(Encoding, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Initiates an asynchronous operation to download the blob's contents as a string.

[DoesServiceRequest]
public virtual Task<string> DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)

Parameters

encoding Encoding

An object that indicates the text encoding to use.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler IProgress<StorageProgress>

A IProgress<T> object to handle StorageProgress messages.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

DownloadTextAsync(Encoding, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to download the blob's contents as a string.

[DoesServiceRequest]
public virtual Task<string> DownloadTextAsync(Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

encoding Encoding

An object that indicates the text encoding to use.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

DownloadTextAsync(CancellationToken)

Initiates an asynchronous operation to download the blob's contents as a string.

[DoesServiceRequest]
public virtual Task<string> DownloadTextAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

EndCreateSnapshot(IAsyncResult)

Ends an asynchronous operation to create a snapshot of the blob.

public virtual CloudBlockBlob EndCreateSnapshot(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

CloudBlockBlob

A CloudBlockBlob object that is a blob snapshot.

EndDownloadBlockList(IAsyncResult)

Ends an asynchronous operation to return an enumerable collection of the blob's blocks, using the specified block list filter.

public virtual IEnumerable<ListBlockItem> EndDownloadBlockList(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

IEnumerable<ListBlockItem>

An enumerable collection of objects implementing ListBlockItem.

EndDownloadText(IAsyncResult)

Ends an asynchronous operation to download the blob's contents as a string.

public virtual string EndDownloadText(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

string

The contents of the blob, as a string.

EndOpenWrite(IAsyncResult)

Ends an asynchronous operation to open a stream for writing to the blob.

public virtual CloudBlobStream EndOpenWrite(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

Returns

CloudBlobStream

A CloudBlobStream to be used for writing to the blob.

EndPutBlock(IAsyncResult)

Ends an asynchronous operation to upload a single block.

public virtual void EndPutBlock(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndPutBlockList(IAsyncResult)

Ends an asynchronous operation to upload a list of blocks to a new or existing blob.

public virtual void EndPutBlockList(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndSetStandardBlobTier(IAsyncResult)

Ends an asynchronous operation to set the tier of the blob on a standard storage account.

public virtual void EndSetStandardBlobTier(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndUploadFromByteArray(IAsyncResult)

Ends an asynchronous operation to upload the contents of a byte array to a blob.

public virtual void EndUploadFromByteArray(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndUploadFromFile(IAsyncResult)

Ends an asynchronous operation to upload a file to a blob.

public virtual void EndUploadFromFile(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndUploadFromStream(IAsyncResult)

Ends an asynchronous operation to upload a stream to a block blob.

public virtual void EndUploadFromStream(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

EndUploadText(IAsyncResult)

Ends an asynchronous operation to upload a string of text to a blob.

public virtual void EndUploadText(IAsyncResult asyncResult)

Parameters

asyncResult IAsyncResult

An IAsyncResult that references the pending asynchronous operation.

OpenWrite(AccessCondition, BlobRequestOptions, OperationContext)

Opens a stream for writing to the blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual CloudBlobStream OpenWrite(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

CloudBlobStream

A CloudBlobStream to be used for writing to the blob.

Remarks

Note that this method always makes a call to the FetchAttributes(AccessCondition, BlobRequestOptions, OperationContext) method under the covers.

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().

OpenWriteAsync()

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync()

Returns

Task<CloudBlobStream>

A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.

Remarks

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, see OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext).

OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<CloudBlobStream>

A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.

Remarks

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().

OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<CloudBlobStream>

A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.

Remarks

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().

OpenWriteAsync(CancellationToken)

Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<CloudBlobStream>

A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.

Remarks

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 100 MB inclusive.

To throw an exception if the blob exists instead of overwriting it, see OpenWriteAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).

PutBlock(string, Stream, string, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block.

[DoesServiceRequest]
public virtual void PutBlock(string blockId, Stream blockData, string contentMD5, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

PutBlock(string, Uri, long?, long?, string, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a single block, copying from a source URI.

[DoesServiceRequest]
public virtual void PutBlock(string blockId, Uri sourceUri, long? offset, long? count, string contentMD5, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

blockId string

A Base64-encoded string that identifies the block.

sourceUri Uri

A System.Uri specifying the absolute URI to the source blob.

offset long?

The byte offset at which to begin returning content.

count long?

The number of bytes to return, or null to return all bytes through the end of the blob.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.

PutBlockAsync(string, Stream, string)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Stream blockData, string contentMD5)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

PutBlockAsync(string, Stream, string, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

PutBlockAsync(string, Stream, string, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler IProgress<StorageProgress>

A IProgress<T> object to handle StorageProgress messages.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

PutBlockAsync(string, Stream, string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

PutBlockAsync(string, Stream, string, CancellationToken)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Stream blockData, string contentMD5, CancellationToken cancellationToken)

Parameters

blockId string

A Base64-encoded string that identifies the block.

blockData Stream

A Stream object that provides the data for the block.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it. If the BlobRequestOptions.UseTransactionalMd5 property is set to true and the contentMD5 parameter is set to null, then the client library will calculate the MD5 value internally.

PutBlockAsync(string, Uri, long?, long?, string)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Uri sourceUri, long? offset, long? count, string contentMD5)

Parameters

blockId string

A Base64-encoded string that identifies the block.

sourceUri Uri

A System.Uri specifying the absolute URI to the source blob.

offset long?

The byte offset at which to begin returning content.

count long?

The number of bytes to return, or null to return all bytes through the end of the blob.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.

PutBlockAsync(string, Uri, long?, long?, string, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Uri sourceUri, long? offset, long? count, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

blockId string

A Base64-encoded string that identifies the block.

sourceUri Uri

A System.Uri specifying the absolute URI to the source blob.

offset long?

The byte offset at which to begin returning content.

count long?

The number of bytes to return, or null to return all bytes through the end of the blob.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.

PutBlockAsync(string, Uri, long?, long?, string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Uri sourceUri, long? offset, long? count, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

blockId string

A Base64-encoded string that identifies the block.

sourceUri Uri

A System.Uri specifying the absolute URI to the source blob.

offset long?

The byte offset at which to begin returning content.

count long?

The number of bytes to return, or null to return all bytes through the end of the blob.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.

PutBlockAsync(string, Uri, long?, long?, string, CancellationToken)

Initiates an asynchronous operation to upload a single block.

[DoesServiceRequest]
public virtual Task PutBlockAsync(string blockId, Uri sourceUri, long? offset, long? count, string contentMD5, CancellationToken cancellationToken)

Parameters

blockId string

A Base64-encoded string that identifies the block.

sourceUri Uri

A System.Uri specifying the absolute URI to the source blob.

offset long?

The byte offset at which to begin returning content.

count long?

The number of bytes to return, or null to return all bytes through the end of the blob.

contentMD5 string

An optional hash value used to ensure transactional integrity for the block. May be null or an empty string.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

Remarks

Clients may send the Content-MD5 header for a given Put Block operation as a means to ensure transactional integrity over the wire. The contentMD5 parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.

PutBlockList(IEnumerable<string>, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a list of blocks to a new or existing blob.

[DoesServiceRequest]
public virtual void PutBlockList(IEnumerable<string> blockList, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

blockList IEnumerable<string>

An enumerable collection of block IDs, as Base64-encoded strings.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

PutBlockListAsync(IEnumerable<string>)

Initiates an asynchronous operation to upload a list of blocks to a new or existing blob.

[DoesServiceRequest]
public virtual Task PutBlockListAsync(IEnumerable<string> blockList)

Parameters

blockList IEnumerable<string>

An enumerable collection of block IDs, as Base64-encoded strings.

Returns

Task

A Task object that represents the asynchronous operation.

PutBlockListAsync(IEnumerable<string>, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a list of blocks to a new or existing blob.

[DoesServiceRequest]
public virtual Task PutBlockListAsync(IEnumerable<string> blockList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

blockList IEnumerable<string>

An enumerable collection of block IDs, as Base64-encoded strings.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

PutBlockListAsync(IEnumerable<string>, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a list of blocks to a new or existing blob.

[DoesServiceRequest]
public virtual Task PutBlockListAsync(IEnumerable<string> blockList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

blockList IEnumerable<string>

An enumerable collection of block IDs, as Base64-encoded strings.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

PutBlockListAsync(IEnumerable<string>, CancellationToken)

Initiates an asynchronous operation to upload a list of blocks to a new or existing blob.

[DoesServiceRequest]
public virtual Task PutBlockListAsync(IEnumerable<string> blockList, CancellationToken cancellationToken)

Parameters

blockList IEnumerable<string>

An enumerable collection of block IDs, as Base64-encoded strings.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

SetStandardBlobTier(StandardBlobTier, AccessCondition, BlobRequestOptions, OperationContext)

Sets the tier of the blob on a standard storage account.

[DoesServiceRequest]
public virtual void SetStandardBlobTier(StandardBlobTier standardBlobTier, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

standardBlobTier StandardBlobTier

A StandardBlobTier representing the tier to set.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request, or null. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

SetStandardBlobTierAsync(StandardBlobTier)

Initiates an asynchronous operation to set the tier of the blob on a standard storage account.

[DoesServiceRequest]
public virtual Task SetStandardBlobTierAsync(StandardBlobTier standardBlobTier)

Parameters

standardBlobTier StandardBlobTier

A StandardBlobTier representing the tier to set.

Returns

Task

A Task object that represents the asynchronous operation.

SetStandardBlobTierAsync(StandardBlobTier, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to set the tier of the blob on a standard storage account.

[DoesServiceRequest]
public virtual Task SetStandardBlobTierAsync(StandardBlobTier standardBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

standardBlobTier StandardBlobTier

A StandardBlobTier representing the tier to set.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

SetStandardBlobTierAsync(StandardBlobTier, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to set the tier of the blob on a standard storage account.

[DoesServiceRequest]
public virtual Task SetStandardBlobTierAsync(StandardBlobTier standardBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

standardBlobTier StandardBlobTier

A StandardBlobTier representing the tier to set.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

SetStandardBlobTierAsync(StandardBlobTier, CancellationToken)

Initiates an asynchronous operation to set the tier of the blob on a standard storage account.

[DoesServiceRequest]
public virtual Task SetStandardBlobTierAsync(StandardBlobTier standardBlobTier, CancellationToken cancellationToken)

Parameters

standardBlobTier StandardBlobTier

A StandardBlobTier representing the tier to set.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

StartCopy(CloudBlockBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)

Begins an operation to start copying another block blob's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual string StartCopy(CloudBlockBlob source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

source CloudBlockBlob

A CloudBlockBlob object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source blob. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

string

The copy ID associated with the copy operation.

Remarks

This method fetches the blob's ETag, last-modified time, and part of the copy state. The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.

StartCopy(CloudFile, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)

Begins an operation to start copying an Azure file's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual string StartCopy(CloudFile source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

source CloudFile

A CloudFile object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source file. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

string

The copy ID associated with the copy operation.

Remarks

This method fetches the blob's ETag, last-modified time, and part of the copy state. The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.

StartCopyAsync(CloudBlockBlob)

Initiates an asynchronous operation to start copying another block blob's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudBlockBlob source)

Parameters

source CloudBlockBlob

A CloudBlockBlob object.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

StartCopyAsync(CloudBlockBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to start copying another block blob's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudBlockBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

source CloudBlockBlob

A CloudBlockBlob object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source blob. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

StartCopyAsync(CloudBlockBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to start copying another block blob's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudBlockBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

source CloudBlockBlob

A CloudBlockBlob object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source blob. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

StartCopyAsync(CloudBlockBlob, CancellationToken)

Initiates an asynchronous operation to start copying another block blob's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudBlockBlob source, CancellationToken cancellationToken)

Parameters

source CloudBlockBlob

A CloudBlockBlob object.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

StartCopyAsync(CloudFile)

Initiates an asynchronous operation to start copying a file's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudFile source)

Parameters

source CloudFile

A CloudFile object.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

StartCopyAsync(CloudFile, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to start copying a file's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudFile source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

source CloudFile

A CloudFile object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source file. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

StartCopyAsync(CloudFile, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to start copying a file's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudFile source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

source CloudFile

A CloudFile object.

sourceAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the source file. If null, no condition is used.

destAccessCondition AccessCondition

An AccessCondition object that represents the access conditions for the destination blob. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

StartCopyAsync(CloudFile, CancellationToken)

Initiates an asynchronous operation to start copying a file's contents, properties, and metadata to this block blob.

[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudFile source, CancellationToken cancellationToken)

Parameters

source CloudFile

A CloudFile object.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task<string>

A Task<TResult> object of type string that represents the asynchronous operation.

UploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)

Uploads the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadFromByteArrayAsync(byte[], int, int)

Initiates an asynchronous operation to upload the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Initiates an asynchronous operation to upload the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler IProgress<StorageProgress>

A IProgress<T> object to handle StorageProgress messages.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromByteArrayAsync(byte[], int, int, CancellationToken)

Initiates an asynchronous operation to upload the contents of a byte array to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)

Parameters

buffer byte[]

An array of bytes.

index int

The zero-based byte offset in buffer at which to begin uploading bytes to the blob.

count int

The number of bytes to be written to the blob.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a file to the Blob service. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual void UploadFromFile(string path, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Remarks

Examples

Warning

It looks like the sample you are looking for does not exist.

UploadFromFileAsync(string)

Initiates an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path)

Parameters

path string

A string containing the file path providing the blob content.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Initiates an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler IProgress<StorageProgress>

A IProgress<T> object to handle StorageProgress messages.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

path string

A string containing the file path providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromFileAsync(string, CancellationToken)

Initiates an asynchronous operation to upload a file to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, CancellationToken cancellationToken)

Parameters

path string

A string containing the file path providing the blob content.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual void UploadFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual void UploadFromStream(Stream source, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadFromStreamAsync(Stream)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source)

Parameters

source Stream

A Stream object providing the blob content.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler IProgress<StorageProgress>

A IProgress<T> object to handle StorageProgress messages.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler IProgress<StorageProgress>

A IProgress<T> object to handle StorageProgress messages.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, long, CancellationToken)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

length long

The number of bytes to write from the source stream at its current position.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadFromStreamAsync(Stream, CancellationToken)

Initiates an asynchronous operation to upload a stream to a block blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, CancellationToken cancellationToken)

Parameters

source Stream

A Stream object providing the blob content.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext)

Uploads a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual void UploadText(string content, Encoding encoding = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)

Parameters

content string

A string containing the text to upload.

encoding Encoding

A Encoding object that indicates the text encoding to use. If null, UTF-8 will be used.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request. If null, default options are applied to the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

UploadTextAsync(string)

Initiates an asynchronous operation to upload a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadTextAsync(string content)

Parameters

content string

A string containing the text to upload.

Returns

Task

A Task object that represents the asynchronous operation.

UploadTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to upload a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)

Parameters

content string

A string containing the text to upload.

encoding Encoding

A Encoding object that indicates the text encoding to use. If null, UTF-8 will be used.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

Task

A Task object that represents the asynchronous operation.

UploadTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)

Initiates an asynchronous operation to upload a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)

Parameters

content string

A string containing the text to upload.

encoding Encoding

A Encoding object that indicates the text encoding to use. If null, UTF-8 will be used.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

progressHandler IProgress<StorageProgress>

A IProgress<T> object to handle StorageProgress messages.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to upload a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadTextAsync(string content, Encoding encoding, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)

Parameters

content string

A string containing the text to upload.

encoding Encoding

A Encoding object that indicates the text encoding to use. If null, UTF-8 will be used.

accessCondition AccessCondition

An AccessCondition object that represents the condition that must be met in order for the request to proceed.

options BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.

UploadTextAsync(string, CancellationToken)

Initiates an asynchronous operation to upload a string of text to a blob. If the blob already exists, it will be overwritten.

[DoesServiceRequest]
public virtual Task UploadTextAsync(string content, CancellationToken cancellationToken)

Parameters

content string

A string containing the text to upload.

cancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

Task

A Task object that represents the asynchronous operation.