Class CloudAppendBlob
- Namespace
- Microsoft.WindowsAzure.Storage.Blob
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents an append blob, a type of blob where blocks of data are always committed to the end of the blob.
public class CloudAppendBlob : CloudBlob, ICloudBlob, IListBlobItem
- Inheritance
-
CloudAppendBlob
- Implements
- Inherited Members
Constructors
CloudAppendBlob(StorageUri, DateTimeOffset?, StorageCredentials)
Initializes a new instance of the CloudAppendBlob class using an absolute URI to the blob.
public CloudAppendBlob(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.
CloudAppendBlob(StorageUri, DateTimeOffset?, CloudBlobClient)
Initializes a new instance of the CloudAppendBlob class using an absolute URI to the blob.
public CloudAppendBlob(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.
CloudAppendBlob(Uri)
Initializes a new instance of the CloudAppendBlob class using an absolute URI to the blob.
public CloudAppendBlob(Uri blobAbsoluteUri)
Parameters
blobAbsoluteUri
UriA System.Uri specifying the absolute URI to the blob.
CloudAppendBlob(Uri, StorageCredentials)
Initializes a new instance of the CloudAppendBlob class using an absolute URI to the blob.
public CloudAppendBlob(Uri blobAbsoluteUri, StorageCredentials credentials)
Parameters
blobAbsoluteUri
UriA System.Uri specifying the absolute URI to the blob.
credentials
StorageCredentialsA StorageCredentials object.
CloudAppendBlob(Uri, CloudBlobClient)
Initializes a new instance of the CloudAppendBlob class using an absolute URI to the blob.
public CloudAppendBlob(Uri blobAbsoluteUri, CloudBlobClient client)
Parameters
blobAbsoluteUri
UriA System.Uri specifying the absolute URI to the blob.
client
CloudBlobClientA CloudBlobClient object.
CloudAppendBlob(Uri, DateTimeOffset?, StorageCredentials)
Initializes a new instance of the CloudAppendBlob class using an absolute URI to the blob.
public CloudAppendBlob(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.
CloudAppendBlob(Uri, DateTimeOffset?, CloudBlobClient)
Initializes a new instance of the CloudAppendBlob class using an absolute URI to the blob.
public CloudAppendBlob(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 number of bytes to buffer when writing to an append blob stream.
public int StreamWriteSizeInBytes { get; set; }
Property Value
- int
The size of a block, in bytes, ranging from between 16 KB and 4 MB inclusive.
Methods
AppendBlock(Stream, string, AccessCondition, BlobRequestOptions, OperationContext)
Commits a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual long AppendBlock(Stream blockData, string contentMD5 = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
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.
Returns
- long
The offset at which the block was appended.
Remarks
Clients may send the Content-MD5 header for a given Append 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.
AppendBlockAsync(Stream, string)
Initiates an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual Task<long> AppendBlockAsync(Stream blockData, string contentMD5 = null)
Parameters
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 Append 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.
AppendBlockAsync(Stream, string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual Task<long> AppendBlockAsync(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
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 Append 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.
AppendBlockAsync(Stream, string, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual Task<long> AppendBlockAsync(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Parameters
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 Append 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.
AppendBlockAsync(Stream, string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual Task<long> AppendBlockAsync(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
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 Append 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.
AppendBlockAsync(Stream, string, CancellationToken)
Initiates an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual Task<long> AppendBlockAsync(Stream blockData, string contentMD5, CancellationToken cancellationToken)
Parameters
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.
AppendFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)
Appends the contents of a byte array to an append blob.Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual void AppendFromByteArray(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromByteArrayAsync(byte[], int, int)
Initiates an asynchronous operation to append the contents of a byte array to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromByteArrayAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to append the contents of a byte array to an append blob.This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendFromByteArrayAsync(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
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to an append blob.This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendFromByteArrayAsync(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
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to an append blob.This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendFromByteArrayAsync(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
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromByteArrayAsync(byte[], int, int, CancellationToken)
Initiates an asynchronous operation to append the contents of a byte array to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromByteArrayAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendFromFile(string, AccessCondition, BlobRequestOptions, OperationContext)
Appends a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual void AppendFromFile(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
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromFileAsync(string)
Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromFileAsync(string path)
Parameters
path
stringA string containing the file path providing the blob content.
Returns
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromFileAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromFileAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromFileAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromFileAsync(string, CancellationToken)
Initiates an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromFileAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Appends a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual void AppendFromStream(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Appends a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual void AppendFromStream(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStreamAsync(Stream)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(Stream source)
Parameters
Returns
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStreamAsync(Stream, long)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendFromStreamAsync(Stream, long, CancellationToken)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendFromStreamAsync(Stream, CancellationToken)
Initiates an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task AppendFromStreamAsync(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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
AppendText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext)
Appends a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual void AppendText(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.
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendTextAsync(string)
Initiates an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendTextAsync(string content)
Parameters
content
stringA string containing the text to upload.
Returns
AppendTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendTextAsync(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
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendTextAsync(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
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendTextAsync(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
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
AppendTextAsync(string, CancellationToken)
Initiates an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual Task AppendTextAsync(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.
Returns
BeginAppendBlock(Stream, AsyncCallback, object)
Begins an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendBlock(Stream blockData, AsyncCallback callback, object state)
Parameters
blockData
StreamA Stream object that provides the data for the block.
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.
BeginAppendBlock(Stream, string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendBlock(Stream blockData, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
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.
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 Append 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.
BeginAppendBlock(Stream, string, AsyncCallback, object)
Begins an asynchronous operation to commit a new block of data to the end of the blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendBlock(Stream blockData, string contentMD5, AsyncCallback callback, object state)
Parameters
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 Append 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.
BeginAppendFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to append the contents of a byte array to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromByteArray(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
BeginAppendFromByteArray(byte[], int, int, AsyncCallback, object)
Begins an asynchronous operation to append the contents of a byte array to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromByteArray(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
BeginAppendFromFile(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromFile(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
BeginAppendFromFile(string, AsyncCallback, object)
Begins an asynchronous operation to append a file to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromFile(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
BeginAppendFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromStream(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
BeginAppendFromStream(Stream, AsyncCallback, object)
Begins an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromStream(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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
BeginAppendFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longSpecifies the number of bytes from the Stream source to upload from the start 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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
BeginAppendFromStream(Stream, long, AsyncCallback, object)
Begins an asynchronous operation to append a stream to an append blob. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendFromStream(Stream source, long length, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longSpecifies the number of bytes from the Stream source to upload from the start 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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
BeginAppendText(string, AsyncCallback, object)
Begins an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendText(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.
BeginAppendText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginAppendText(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.
Remarks
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
BeginCreateOrReplace(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to create an empty append blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateOrReplace(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.
BeginCreateOrReplace(AsyncCallback, object)
Begins an asynchronous operation to create an empty append blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, use BeginCreateOrReplace(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateOrReplace(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(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.
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(bool, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to open a stream for writing to the blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginOpenWrite(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
createNew
boolUse
true
to create a new append blob or overwrite an existing one,false
to append to an existing blob.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 4 MB inclusive.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
BeginOpenWrite(bool, AsyncCallback, object)
Begins an asynchronous operation to open a stream for writing to the blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginOpenWrite(bool createNew, AsyncCallback callback, object state)
Parameters
createNew
boolUse
true
to create a new append blob or overwrite an existing one,false
to append to an existing 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.
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 4 MB inclusive.
BeginStartCopy(CloudAppendBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to start copying another append blob's contents, properties, and metadata to this append blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
CloudAppendBlobA CloudAppendBlob 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(CloudAppendBlob, AsyncCallback, object)
Begins an asynchronous operation to start copying another append blob's contents, properties, and metadata to this append blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudAppendBlob source, AsyncCallback callback, object state)
Parameters
source
CloudAppendBlobA CloudAppendBlob 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 an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
BeginUploadFromByteArray(byte[], int, int, AsyncCallback, object)
Begins an asynchronous operation to upload the contents of a byte array to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios. To append data to an append blob that already exists, see BeginAppendFromByteArray(byte[], int, int, AsyncCallback, object).
BeginUploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendFromFile(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
BeginUploadFromFile(string, AsyncCallback, object)
Begins an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendFromFile(string, AsyncCallback, object).
BeginUploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
BeginUploadFromStream(Stream, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendFromStream(Stream, AsyncCallback, object).
BeginUploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
longSpecifies the number of bytes from the Stream source to upload from the start 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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
BeginUploadFromStream(Stream, long, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longSpecifies the number of bytes from the Stream source to upload from the start 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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendFromStream(Stream, long, AsyncCallback, object).
BeginUploadText(string, AsyncCallback, object)
Begins an asynchronous operation to upload a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios. To append data to an append blob that already exists, see BeginAppendText(string, AsyncCallback, object).
BeginUploadText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see BeginAppendText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
CreateOrReplace(AccessCondition, BlobRequestOptions, OperationContext)
Creates an empty append blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual void CreateOrReplace(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.
CreateOrReplaceAsync()
Initiates an asynchronous operation to create an empty append blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, use CreateOrReplaceAsync(AccessCondition, BlobRequestOptions, OperationContext).
[DoesServiceRequest]
public virtual Task CreateOrReplaceAsync()
Returns
CreateOrReplaceAsync(AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to create an empty append blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual Task CreateOrReplaceAsync(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
CreateOrReplaceAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to create an empty append blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual Task CreateOrReplaceAsync(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
CreateOrReplaceAsync(CancellationToken)
Initiates an asynchronous operation to create an append blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, use CreateOrReplaceAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
[DoesServiceRequest]
public virtual Task CreateOrReplaceAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
CreateSnapshot(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext)
Creates a snapshot of the blob.
[DoesServiceRequest]
public virtual CloudAppendBlob 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
- CloudAppendBlob
A CloudAppendBlob object that is a blob snapshot.
CreateSnapshotAsync()
Initiates an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual Task<CloudAppendBlob> CreateSnapshotAsync()
Returns
- Task<CloudAppendBlob>
A Task<TResult> object of type CloudAppendBlob 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<CloudAppendBlob> 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<CloudAppendBlob>
A Task<TResult> object of type CloudAppendBlob 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<CloudAppendBlob> 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<CloudAppendBlob>
A Task<TResult> object of type CloudAppendBlob that represents the asynchronous operation.
CreateSnapshotAsync(CancellationToken)
Initiates an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual Task<CloudAppendBlob> CreateSnapshotAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<CloudAppendBlob>
A Task<TResult> object of type CloudAppendBlob 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.
EndAppendBlock(IAsyncResult)
Ends an asynchronous operation to commit a new block of data to the end of the blob.
public virtual long EndAppendBlock(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
EndAppendFromByteArray(IAsyncResult)
Ends an asynchronous operation to append the contents of a byte array to an append blob. Recommended only for single-writer scenarios.
public virtual void EndAppendFromByteArray(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndAppendFromFile(IAsyncResult)
Ends an asynchronous operation to upload a file to an append blob. Recommended only for single-writer scenarios.
public virtual void EndAppendFromFile(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
EndAppendFromStream(IAsyncResult)
Ends an asynchronous operation to append a stream to an append blob.
public virtual void EndAppendFromStream(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndAppendText(IAsyncResult)
Ends an asynchronous operation to append a string of text to an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
public virtual void EndAppendText(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndCreateOrReplace(IAsyncResult)
Ends an asynchronous operation to create an append blob.
public virtual void EndCreateOrReplace(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndCreateSnapshot(IAsyncResult)
Ends an asynchronous operation to create a snapshot of the blob.
public virtual CloudAppendBlob EndCreateSnapshot(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- CloudAppendBlob
A CloudAppendBlob object that is a blob snapshot.
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 object.
EndUploadFromByteArray(IAsyncResult)
Ends an asynchronous operation to upload the contents of a byte array to an append blob. Recommended only for single-writer scenarios.
public virtual void EndUploadFromByteArray(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
EndUploadFromFile(IAsyncResult)
Ends an asynchronous operation to upload a file to an append blob. Recommended only for single-writer scenarios.
public virtual void EndUploadFromFile(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
EndUploadFromStream(IAsyncResult)
Ends an asynchronous operation to upload a stream to an append 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 an append blob. This API should be used strictly in a single writer scenario because the API internally uses the append-offset conditional header to avoid duplicate blocks which does not work in a multiple writer scenario.
public virtual void EndUploadText(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
OpenWrite(bool, AccessCondition, BlobRequestOptions, OperationContext)
Opens a stream for writing to the blob.
[DoesServiceRequest]
public virtual CloudBlobStream OpenWrite(bool createNew, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
createNew
boolUse
true
to create a new append blob or overwrite an existing one,false
to append to an existing blob.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 object.
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 4 MB inclusive.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
OpenWriteAsync(bool)
Initiates an asynchronous operation to open a stream for writing to the blob.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(bool createNew)
Parameters
createNew
boolUse
true
to create a new append blob or overwrite an existing one,false
to append to an existing blob.
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 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 4 MB inclusive.
OpenWriteAsync(bool, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to open a stream for writing to the blob.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
createNew
boolUse
true
to create a new append blob or overwrite an existing one,false
to append to an existing blob.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 4 MB inclusive.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
OpenWriteAsync(bool, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to open a stream for writing to the blob.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(bool createNew, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
createNew
boolUse
true
to create a new append blob or overwrite an existing one,false
to append to an existing blob.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 4 MB inclusive.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
OpenWriteAsync(bool, CancellationToken)
Initiates an asynchronous operation to open a stream for writing to the blob.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(bool createNew, CancellationToken cancellationToken)
Parameters
createNew
boolUse
true
to create a new append blob or overwrite an existing one,false
to append to an existing blob.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 4 MB inclusive.
StartCopy(CloudAppendBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)
Begins an operation to start copying another append blob's contents, properties, and metadata to this append blob.
[DoesServiceRequest]
public virtual string StartCopy(CloudAppendBlob source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
source
CloudAppendBlobThe System.Uri of the source blob.
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.
StartCopyAsync(CloudAppendBlob)
Initiates an asynchronous operation to start copying another append blob's contents, properties, and metadata to this append blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudAppendBlob source)
Parameters
source
CloudAppendBlobA CloudAppendBlob object.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartCopyAsync(CloudAppendBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to start copying another append blob's contents, properties, and metadata to this append blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
source
CloudAppendBlobA CloudAppendBlob 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(CloudAppendBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to start copying another append blob's contents, properties, and metadata to this append blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudAppendBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
CloudAppendBlobA CloudAppendBlob 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(CloudAppendBlob, CancellationToken)
Initiates an asynchronous operation to start copying another append blob's contents, properties, and metadata to this append blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudAppendBlob source, CancellationToken cancellationToken)
Parameters
source
CloudAppendBlobA CloudAppendBlob 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 an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromByteArrayAsync(byte[], int, int)
Initiates an asynchronous operation to upload the contents of a byte array to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios. To append data to an append blob that already exists, see AppendFromByteArrayAsync(byte[], int, int).
UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload the contents of a byte array to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromByteArrayAsync(byte[], int, int, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios. To append data to an append blob that already exists, see AppendFromByteArrayAsync(byte[], int, int, CancellationToken).
UploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromFile(string, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromFileAsync(string)
Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path)
Parameters
path
stringA string containing the file path providing the blob content.
Returns
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
To append data to an append blob that already exists, see AppendFromFileAsync(string).
UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromFileAsync(string, CancellationToken)
Initiates an asynchronous operation to upload a file to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
To append data to an append blob that already exists, see AppendFromFileAsync(string, CancellationToken).
UploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromStreamAsync(Stream)
Initiates an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source)
Parameters
Returns
Remarks
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream).
UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromStreamAsync(Stream, long)
Initiates an asynchronous operation to upload a stream to an append 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
Remarks
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, long).
UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext).
UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadFromStreamAsync(Stream, long, CancellationToken)
Initiates an asynchronous operation to upload a stream to an append 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
Remarks
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, long, CancellationToken).
UploadFromStreamAsync(Stream, CancellationToken)
Initiates an asynchronous operation to upload a stream to an append 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
Remarks
To append data to an append blob that already exists, see AppendFromStreamAsync(Stream, CancellationToken).
UploadText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendText(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext).
UploadTextAsync(string)
Initiates an asynchronous operation to upload a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[DoesServiceRequest]
public virtual Task UploadTextAsync(string content)
Parameters
content
stringA string containing the text to upload.
Returns
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios. To append data to an append blob that already exists, see AppendTextAsync(string).
UploadTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext).
UploadTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendTextAsync(string, Encoding, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
UploadTextAsync(string, CancellationToken)
Initiates an asynchronous operation to upload a string of text to an append blob. If the blob already exists, it will be overwritten. Recommended only for single-writer scenarios.
[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.
Returns
Remarks
Use this method only in single-writer scenarios. Internally, this method uses the append-offset conditional header to avoid duplicate blocks, which may cause problems in multiple-writer scenarios.
If you have a single-writer scenario, see AbsorbConditionalErrorsOnRetry to determine whether setting this flag to true
is acceptable for your scenario.
To append data to an append blob that already exists, see AppendTextAsync(string, CancellationToken).