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
StorageUriA 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
StorageCredentialsA 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
StorageUriA 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
CloudBlobClientA 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
UriA 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
UriA System.Uri specifying the absolute URI to the blob.
credentials
StorageCredentialsA 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
UriA System.Uri specifying the absolute URI to the blob.
client
CloudBlobClientA 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
UriA System.Uri specifying the absolute URI to the blob.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
credentials
StorageCredentialsA 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
UriA System.Uri specifying the absolute URI to the blob.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
client
CloudBlobClientA 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
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
BlockListingFilterA BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
EncodingAn object that indicates the text encoding to use.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
. Ifnull
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
stringA Base64-encoded string that identifies the block.
sourceUri
UriA 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
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
StandardBlobTierA StandardBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
StandardBlobTierA StandardBlobTier representing the tier to set.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
CloudBlockBlobA CloudBlockBlob object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
CloudBlockBlobA CloudBlockBlob object.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
CloudFileA CloudFile object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source file. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
CloudFileA CloudFile object.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
stringA string containing the file path providing the blob content.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
StreamA Stream object providing the blob content.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
stringA string containing the text to upload.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
stringA string containing the text to upload.
encoding
EncodingA Encoding object that indicates the text encoding to use. If
null
, UTF-8 will be used.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
. Ifnull
, default options are applied to the request.operationContext
OperationContextAn 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA 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
CancellationTokenA 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
BlockListingFilterA BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
BlockListingFilterA BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
BlockListingFilterA BlockListingFilter enumeration value that indicates whether to return committed blocks, uncommitted blocks, or both.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA 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
CancellationTokenA 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
EncodingAn object that indicates the text encoding to use.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
EncodingAn object that indicates the text encoding to use.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
EncodingAn object that indicates the text encoding to use.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA 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
EncodingAn object that indicates the text encoding to use.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA 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
CancellationTokenA 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
IAsyncResultAn 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA 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
CancellationTokenA 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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
stringA Base64-encoded string that identifies the block.
sourceUri
UriA 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
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.
Returns
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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA Base64-encoded string that identifies the block.
blockData
StreamA Stream object that provides the data for the block.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA Base64-encoded string that identifies the block.
sourceUri
UriA 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
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.
Returns
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
stringA Base64-encoded string that identifies the block.
sourceUri
UriA 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
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
stringA Base64-encoded string that identifies the block.
sourceUri
UriA 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
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA Base64-encoded string that identifies the block.
sourceUri
UriA 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
stringAn optional hash value used to ensure transactional integrity for the block. May be
null
or an empty string.cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StandardBlobTierA StandardBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
. Ifnull
, default options are applied to the request.operationContext
OperationContextAn 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
StandardBlobTierA StandardBlobTier representing the tier to set.
Returns
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
StandardBlobTierA StandardBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
StandardBlobTierA StandardBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StandardBlobTierA StandardBlobTier representing the tier to set.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
CloudBlockBlobA CloudBlockBlob object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
CloudFileA CloudFile object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source file. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
CloudBlockBlobA 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
CloudBlockBlobA CloudBlockBlob object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
CloudBlockBlobA CloudBlockBlob object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA 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
CloudBlockBlobA CloudBlockBlob object.
cancellationToken
CancellationTokenA 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
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
CloudFileA CloudFile object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source file. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn 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
CloudFileA CloudFile object.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source file. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA 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
CloudFileA CloudFile object.
cancellationToken
CancellationTokenA 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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
Returns
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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Remarks
Examples
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
stringA string containing the file path providing the blob content.
Returns
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
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA string containing the file path providing the blob content.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
Returns
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
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
Returns
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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
StreamA Stream object providing the blob content.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA string containing the text to upload.
encoding
EncodingA Encoding object that indicates the text encoding to use. If
null
, UTF-8 will be used.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn 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
stringA string containing the text to upload.
Returns
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
stringA string containing the text to upload.
encoding
EncodingA Encoding object that indicates the text encoding to use. If
null
, UTF-8 will be used.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
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
stringA string containing the text to upload.
encoding
EncodingA Encoding object that indicates the text encoding to use. If
null
, UTF-8 will be used.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA string containing the text to upload.
encoding
EncodingA Encoding object that indicates the text encoding to use. If
null
, UTF-8 will be used.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
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
stringA string containing the text to upload.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.