Interface ICloudBlob
- Namespace
- Microsoft.WindowsAzure.Storage.Blob
- Assembly
- Microsoft.WindowsAzure.Storage.dll
An interface required for Microsoft Azure blob types. The CloudBlockBlob and CloudPageBlob classes implement the ICloudBlob interface.
public interface ICloudBlob : IListBlobItem
- Inherited Members
Properties
BlobType
Gets the type of the blob.
BlobType BlobType { get; }
Property Value
CopyState
Gets the state of the most recent or pending copy operation.
CopyState CopyState { get; }
Property Value
- CopyState
A CopyState object containing the copy state, or
null
if there is no copy state for the blob.
IsSnapshot
Gets a value indicating whether this blob is a snapshot.
bool IsSnapshot { get; }
Property Value
- bool
true
if this blob is a snapshot; otherwise,false
.
Metadata
Gets the user-defined metadata for the blob.
IDictionary<string, string> Metadata { get; }
Property Value
- IDictionary<string, string>
An IDictionary<TKey, TValue> object containing the blob's metadata as a collection of name-value pairs.
Name
Gets the blob's name.
string Name { get; }
Property Value
- string
A string containing the name of the blob.
Properties
Gets the blob's system properties.
BlobProperties Properties { get; }
Property Value
- BlobProperties
A BlobProperties object.
ServiceClient
Gets the CloudBlobClient object that represents the Blob service.
CloudBlobClient ServiceClient { get; }
Property Value
- CloudBlobClient
A CloudBlobClient object.
SnapshotQualifiedStorageUri
Gets the blob's URI for both the primary and secondary locations, including query string information if the blob is a snapshot.
StorageUri SnapshotQualifiedStorageUri { get; }
Property Value
- StorageUri
An object of type StorageUri containing the blob's URIs for both the primary and secondary locations, including snapshot query information if the blob is a snapshot.
SnapshotQualifiedUri
Gets the absolute URI to the blob, including query string information if the blob is a snapshot.
Uri SnapshotQualifiedUri { get; }
Property Value
- Uri
A System.Uri specifying the absolute URI to the blob, including snapshot query information if the blob is a snapshot.
SnapshotTime
Gets the date and time that the blob snapshot was taken, if this blob is a snapshot.
DateTimeOffset? SnapshotTime { get; }
Property Value
- DateTimeOffset?
A DateTimeOffset containing the blob's snapshot time if the blob is a snapshot; otherwise,
null
.
Remarks
If the blob is not a snapshot, the value of this property is null
.
StreamMinimumReadSizeInBytes
Gets or sets the minimum number of bytes to buffer when reading from a blob stream.
int StreamMinimumReadSizeInBytes { get; set; }
Property Value
- int
The minimum number of bytes to buffer.
StreamWriteSizeInBytes
Gets or sets the number of bytes to buffer when writing to a page blob stream or the block size for writing to a block blob.
int StreamWriteSizeInBytes { get; set; }
Property Value
- int
The number of bytes to buffer or the size of a block, in bytes.
Methods
AbortCopy(string, AccessCondition, BlobRequestOptions, OperationContext)
Aborts an ongoing blob copy operation.
void AbortCopy(string copyId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
copyId
stringA string identifying the copy operation.
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.
AbortCopyAsync(string)
Initiates an asynchronous operation to abort an ongoing blob copy operation.
Task AbortCopyAsync(string copyId)
Parameters
copyId
stringA string identifying the copy operation.
Returns
AbortCopyAsync(string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to abort an ongoing blob copy operation.
Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
copyId
stringA string identifying the copy operation.
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
AbortCopyAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to abort an ongoing blob copy operation.
Task AbortCopyAsync(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
copyId
stringA string identifying the copy operation.
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
AbortCopyAsync(string, CancellationToken)
Initiates an asynchronous operation to abort an ongoing blob copy operation.
Task AbortCopyAsync(string copyId, CancellationToken cancellationToken)
Parameters
copyId
stringA string identifying the copy operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
AcquireLease(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext)
Acquires a lease on this blob.
string AcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
leaseTime
TimeSpan?A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
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 ID of the acquired lease.
AcquireLeaseAsync(TimeSpan?, string)
Initiates an asynchronous operation to acquire a lease on this blob.
Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId = null)
Parameters
leaseTime
TimeSpan?A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
Returns
AcquireLeaseAsync(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to acquire a lease on this blob.
Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
leaseTime
TimeSpan?A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
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
AcquireLeaseAsync(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to acquire a lease on this blob.
Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
leaseTime
TimeSpan?A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
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
AcquireLeaseAsync(TimeSpan?, string, CancellationToken)
Initiates an asynchronous operation to acquire a lease on this blob.
Task<string> AcquireLeaseAsync(TimeSpan? leaseTime, string proposedLeaseId, CancellationToken cancellationToken)
Parameters
leaseTime
TimeSpan?A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
BeginAbortCopy(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to abort an ongoing blob copy operation.
ICancellableAsyncResult BeginAbortCopy(string copyId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
copyId
stringA string identifying the copy operation.
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.
BeginAbortCopy(string, AsyncCallback, object)
Begins an asynchronous operation to abort an ongoing blob copy operation.
ICancellableAsyncResult BeginAbortCopy(string copyId, AsyncCallback callback, object state)
Parameters
copyId
stringA string identifying the copy 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.
BeginAcquireLease(TimeSpan?, string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to acquire a lease on this blob.
ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
leaseTime
TimeSpan?A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
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 optional callback 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.
BeginAcquireLease(TimeSpan?, string, AsyncCallback, object)
Begins an asynchronous operation to acquire a lease on this blob.
ICancellableAsyncResult BeginAcquireLease(TimeSpan? leaseTime, string proposedLeaseId, AsyncCallback callback, object state)
Parameters
leaseTime
TimeSpan?A TimeSpan representing the span of time for which to acquire the lease, which will be rounded down to seconds.
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
callback
AsyncCallbackAn optional callback 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.
BeginBreakLease(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to break the current lease on this blob.
ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
breakPeriod
TimeSpan?A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.
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 optional callback 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.
BeginBreakLease(TimeSpan?, AsyncCallback, object)
Begins an asynchronous operation to break the current lease on this blob.
ICancellableAsyncResult BeginBreakLease(TimeSpan? breakPeriod, AsyncCallback callback, object state)
Parameters
breakPeriod
TimeSpan?A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.
callback
AsyncCallbackAn optional callback 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.
BeginChangeLease(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to change the lease on this blob.
ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
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 optional callback 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.
BeginChangeLease(string, AccessCondition, AsyncCallback, object)
Begins an asynchronous operation to change the lease on this blob.
ICancellableAsyncResult BeginChangeLease(string proposedLeaseId, AccessCondition accessCondition, AsyncCallback callback, object state)
Parameters
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
callback
AsyncCallbackAn optional callback 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.
BeginDelete(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to delete the blob.
ICancellableAsyncResult BeginDelete(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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.
BeginDelete(AsyncCallback, object)
Begins an asynchronous operation to delete the blob.
ICancellableAsyncResult BeginDelete(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.
BeginDeleteIfExists(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to delete the blob if it already exists.
ICancellableAsyncResult BeginDeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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.
BeginDeleteIfExists(AsyncCallback, object)
Begins an asynchronous request to delete the blob if it already exists.
ICancellableAsyncResult BeginDeleteIfExists(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.
BeginDownloadRangeToByteArray(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to download a range of bytes from a blob to a byte array.
ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
blobOffset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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.
BeginDownloadRangeToByteArray(byte[], int, long?, long?, AsyncCallback, object)
Begins an asynchronous operation to download a range of bytes from a blob to a byte array.
ICancellableAsyncResult BeginDownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AsyncCallback callback, object state)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
blobOffset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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.
BeginDownloadRangeToStream(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to download a range of bytes from a blob to a stream.
ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
target
StreamA Stream object representing the target stream.
offset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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.
BeginDownloadRangeToStream(Stream, long?, long?, AsyncCallback, object)
Begins an asynchronous operation to download a range of bytes from a blob to a stream.
ICancellableAsyncResult BeginDownloadRangeToStream(Stream target, long? offset, long? length, AsyncCallback callback, object state)
Parameters
target
StreamA Stream object representing the target stream.
offset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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.
BeginDownloadToByteArray(byte[], int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to download the contents of a blob to a byte array.
ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
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.
BeginDownloadToByteArray(byte[], int, AsyncCallback, object)
Begins an asynchronous operation to download the contents of a blob to a byte array.
ICancellableAsyncResult BeginDownloadToByteArray(byte[] target, int index, AsyncCallback callback, object state)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
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.
BeginDownloadToFile(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to download the contents of a blob to a file.
ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
path
stringA string containing the path to the target file.
mode
FileModeA FileMode enumeration value that determines how to open or create the file.
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.
BeginDownloadToFile(string, FileMode, AsyncCallback, object)
Begins an asynchronous operation to download the contents of a blob to a file.
ICancellableAsyncResult BeginDownloadToFile(string path, FileMode mode, AsyncCallback callback, object state)
Parameters
path
stringA string containing the path to the target file.
mode
FileModeA FileMode enumeration value that determines how to open or create the file.
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.
BeginDownloadToStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to download the contents of a blob to a stream.
ICancellableAsyncResult BeginDownloadToStream(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
target
StreamA Stream object representing the target stream.
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.
BeginDownloadToStream(Stream, AsyncCallback, object)
Begins an asynchronous operation to download the contents of a blob to a stream.
ICancellableAsyncResult BeginDownloadToStream(Stream target, AsyncCallback callback, object state)
Parameters
target
StreamA Stream object representing the target stream.
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.
BeginExists(BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous request to check existence of the blob.
ICancellableAsyncResult BeginExists(BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
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.
BeginExists(AsyncCallback, object)
Begins an asynchronous request to check existence of the blob.
ICancellableAsyncResult BeginExists(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.
BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to populate the blob's properties and metadata.
ICancellableAsyncResult BeginFetchAttributes(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.
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.
BeginFetchAttributes(AsyncCallback, object)
Begins an asynchronous operation to populate the blob's properties and metadata.
ICancellableAsyncResult BeginFetchAttributes(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.
BeginGetAccountProperties(BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to get properties for the account this blob resides on.
[DoesServiceRequest]
ICancellableAsyncResult BeginGetAccountProperties(BlobRequestOptions requestOptions, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
requestOptions
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 to be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginGetAccountProperties(AsyncCallback, object)
Begins an asynchronous operation to get properties for the account this blob resides on.
[DoesServiceRequest]
ICancellableAsyncResult BeginGetAccountProperties(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object to be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginOpenRead(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to open a stream for reading from the blob.
ICancellableAsyncResult BeginOpenRead(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
Remarks
On the Stream object returned by the EndOpenRead(IAsyncResult) method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.
Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.
Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
BeginOpenRead(AsyncCallback, object)
Begins an asynchronous operation to open a stream for reading from the blob.
ICancellableAsyncResult BeginOpenRead(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
Remarks
On the Stream object returned by the EndOpenRead(IAsyncResult) method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.
Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.
Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
BeginReleaseLease(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to release the lease on this blob.
ICancellableAsyncResult BeginReleaseLease(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, including a required lease ID.
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 optional callback 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.
BeginReleaseLease(AccessCondition, AsyncCallback, object)
Begins an asynchronous operation to release the lease on this blob.
ICancellableAsyncResult BeginReleaseLease(AccessCondition accessCondition, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
callback
AsyncCallbackAn optional callback 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.
BeginRenewLease(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to renew a lease on this blob.
ICancellableAsyncResult BeginRenewLease(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, including a required lease ID.
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 optional callback 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.
BeginRenewLease(AccessCondition, AsyncCallback, object)
Begins an asynchronous operation to renew a lease on this blob.
ICancellableAsyncResult BeginRenewLease(AccessCondition accessCondition, AsyncCallback callback, object state)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
callback
AsyncCallbackAn optional callback 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.
BeginSetMetadata(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to update the blob's metadata.
ICancellableAsyncResult BeginSetMetadata(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.
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.
BeginSetMetadata(AsyncCallback, object)
Begins an asynchronous operation to update the blob's metadata.
ICancellableAsyncResult BeginSetMetadata(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.
BeginSetProperties(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to update the blob's properties.
ICancellableAsyncResult BeginSetProperties(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.
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.
BeginSetProperties(AsyncCallback, object)
Begins an asynchronous operation to update the blob's properties.
ICancellableAsyncResult BeginSetProperties(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.
BeginUploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload the contents of a byte array to a blob.
ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromByteArray(byte[], int, int, AsyncCallback, object)
Begins an asynchronous operation to upload the contents of a byte array to a blob.
ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a file to a blob.
ICancellableAsyncResult BeginUploadFromFile(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
path
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromFile(string, AsyncCallback, object)
Begins an asynchronous operation to upload a file to a blob.
ICancellableAsyncResult BeginUploadFromFile(string path, AsyncCallback callback, object state)
Parameters
path
stringA string containing the file path providing the blob content.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a blob.
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.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a blob.
ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a blob.
ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, long, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a block blob.
ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BreakLease(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext)
Breaks the current lease on this blob.
TimeSpan BreakLease(TimeSpan? breakPeriod = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
breakPeriod
TimeSpan?A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.
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
BreakLeaseAsync(TimeSpan?)
Initiates an asynchronous operation to break the current lease on this blob.
Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod)
Parameters
breakPeriod
TimeSpan?A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.
Returns
BreakLeaseAsync(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to break the current lease on this blob.
Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
breakPeriod
TimeSpan?A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.
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
BreakLeaseAsync(TimeSpan?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to break the current lease on this blob.
Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
breakPeriod
TimeSpan?A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.
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
BreakLeaseAsync(TimeSpan?, CancellationToken)
Initiates an asynchronous operation to break the current lease on this blob.
Task<TimeSpan> BreakLeaseAsync(TimeSpan? breakPeriod, CancellationToken cancellationToken)
Parameters
breakPeriod
TimeSpan?A TimeSpan representing the amount of time to allow the lease to remain, which will be rounded down to seconds.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
ChangeLease(string, AccessCondition, BlobRequestOptions, OperationContext)
Changes the lease ID on this blob.
string ChangeLease(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
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 new lease ID.
ChangeLeaseAsync(string, AccessCondition)
Initiates an asynchronous operation to change the lease on this blob.
Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition)
Parameters
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
Returns
ChangeLeaseAsync(string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to change the lease on this blob.
Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
ChangeLeaseAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to change the lease on this blob.
Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
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
ChangeLeaseAsync(string, AccessCondition, CancellationToken)
Initiates an asynchronous operation to change the lease on this blob.
Task<string> ChangeLeaseAsync(string proposedLeaseId, AccessCondition accessCondition, CancellationToken cancellationToken)
Parameters
proposedLeaseId
stringA string representing the proposed lease ID for the new lease.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
Delete(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)
Deletes the blob.
void Delete(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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.
DeleteAsync()
Initiates an asynchronous operation to delete the blob.
Task DeleteAsync()
Returns
DeleteAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to delete the blob.
Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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
DeleteAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to delete the blob.
Task DeleteAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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
DeleteAsync(CancellationToken)
Initiates an asynchronous operation to delete the blob.
Task DeleteAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DeleteIfExists(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)
Deletes the blob if it already exists.
bool DeleteIfExists(DeleteSnapshotsOption deleteSnapshotsOption = DeleteSnapshotsOption.None, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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
- bool
true
if the blob did not already exist and was created; otherwisefalse
.
DeleteIfExistsAsync()
Initiates an asynchronous operation to delete the blob if it already exists.
Task<bool> DeleteIfExistsAsync()
Returns
DeleteIfExistsAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to delete the blob if it already exists.
Task<bool> DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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
DeleteIfExistsAsync(DeleteSnapshotsOption, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to delete the blob if it already exists.
Task<bool> DeleteIfExistsAsync(DeleteSnapshotsOption deleteSnapshotsOption, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
deleteSnapshotsOption
DeleteSnapshotsOptionA DeleteSnapshotsOption object indicating whether to only delete the blob, to delete the blob and all snapshots, or to only delete the snapshots.
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
DeleteIfExistsAsync(CancellationToken)
Initiates an asynchronous operation to delete the blob if it already exists.
Task<bool> DeleteIfExistsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DownloadRangeToByteArray(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Downloads a range of bytes from a blob to a byte array.
int DownloadRangeToByteArray(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
blobOffset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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
- int
The total number of bytes read into the buffer.
DownloadRangeToByteArrayAsync(byte[], int, long?, long?)
Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.
Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
blobOffset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
Returns
DownloadRangeToByteArrayAsync(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.
Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
blobOffset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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
DownloadRangeToByteArrayAsync(byte[], int, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.
Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
blobOffset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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
DownloadRangeToByteArrayAsync(byte[], int, long?, long?, CancellationToken)
Initiates an asynchronous operation to download a range of bytes from a blob to a byte array.
Task<int> DownloadRangeToByteArrayAsync(byte[] target, int index, long? blobOffset, long? length, CancellationToken cancellationToken)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
blobOffset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DownloadRangeToStream(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Downloads a range of bytes from a blob to a stream.
void DownloadRangeToStream(Stream target, long? offset, long? length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
target
StreamA Stream object representing the target stream.
offset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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.
DownloadRangeToStreamAsync(Stream, long?, long?)
Initiates an asynchronous operation to download a range of bytes from a blob to a stream.
Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length)
Parameters
target
StreamA Stream object representing the target stream.
offset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
Returns
DownloadRangeToStreamAsync(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to download a range of bytes from a blob to a stream.
Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
target
StreamA Stream object representing the target stream.
offset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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
DownloadRangeToStreamAsync(Stream, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to download a range of bytes from a blob to a stream.
Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
target
StreamA Stream object representing the target stream.
offset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
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
DownloadRangeToStreamAsync(Stream, long?, long?, CancellationToken)
Initiates an asynchronous operation to download a range of bytes from a blob to a stream.
Task DownloadRangeToStreamAsync(Stream target, long? offset, long? length, CancellationToken cancellationToken)
Parameters
target
StreamA Stream object representing the target stream.
offset
long?The starting offset of the data range, in bytes.
length
long?The length of the data range, in bytes.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DownloadToByteArray(byte[], int, AccessCondition, BlobRequestOptions, OperationContext)
Downloads the contents of a blob to a byte array.
int DownloadToByteArray(byte[] target, int index, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
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
- int
The total number of bytes read into the buffer.
DownloadToByteArrayAsync(byte[], int)
Initiates an asynchronous operation to download the contents of a blob to a byte array.
Task<int> DownloadToByteArrayAsync(byte[] target, int index)
Parameters
Returns
DownloadToByteArrayAsync(byte[], int, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to download the contents of a blob to a byte array.
Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
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
DownloadToByteArrayAsync(byte[], int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to download the contents of a blob to a byte array.
Task<int> DownloadToByteArrayAsync(byte[] target, int index, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
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
DownloadToByteArrayAsync(byte[], int, CancellationToken)
Initiates an asynchronous operation to download the contents of a blob to a byte array.
Task<int> DownloadToByteArrayAsync(byte[] target, int index, CancellationToken cancellationToken)
Parameters
target
byte[]The target byte array.
index
intThe starting offset in the byte array.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DownloadToFile(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext)
Downloads the contents of a blob to a file.
void DownloadToFile(string path, FileMode mode, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
path
stringA string containing the path to the target file.
mode
FileModeA FileMode enumeration value that determines how to open or create the file.
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.
DownloadToFileAsync(string, FileMode)
Initiates an asynchronous operation to download the contents of a blob to a file.
Task DownloadToFileAsync(string path, FileMode mode)
Parameters
path
stringA string containing the path to the target file.
mode
FileModeA FileMode enumeration value that determines how to open or create the file.
Returns
DownloadToFileAsync(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to download the contents of a blob to a file.
Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
path
stringA string containing the path to the target file.
mode
FileModeA FileMode enumeration value that determines how to open or create the file.
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
DownloadToFileAsync(string, FileMode, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to download the contents of a blob to a file.
Task DownloadToFileAsync(string path, FileMode mode, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
path
stringA string containing the path to the target file.
mode
FileModeA FileMode enumeration value that determines how to open or create the file.
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
DownloadToFileAsync(string, FileMode, CancellationToken)
Initiates an asynchronous operation to download the contents of a blob to a file.
Task DownloadToFileAsync(string path, FileMode mode, CancellationToken cancellationToken)
Parameters
path
stringA string containing the path to the target file.
mode
FileModeA FileMode enumeration value that determines how to open or create the file.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
DownloadToStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Downloads the contents of a blob to a stream.
void DownloadToStream(Stream target, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
target
StreamA Stream object representing the target stream.
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.
DownloadToStreamAsync(Stream)
Initiates an asynchronous operation to download the contents of a blob to a stream.
Task DownloadToStreamAsync(Stream target)
Parameters
Returns
DownloadToStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to download the contents of a blob to a stream.
Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
target
StreamA Stream object representing the target stream.
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
DownloadToStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to download the contents of a blob to a stream.
Task DownloadToStreamAsync(Stream target, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
target
StreamA Stream object representing the target stream.
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
DownloadToStreamAsync(Stream, CancellationToken)
Initiates an asynchronous operation to download the contents of a blob to a stream.
Task DownloadToStreamAsync(Stream target, CancellationToken cancellationToken)
Parameters
target
StreamA Stream object representing the target stream.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
EndAbortCopy(IAsyncResult)
Ends an asynchronous operation to abort an ongoing blob copy operation.
void EndAbortCopy(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndAcquireLease(IAsyncResult)
Ends an asynchronous operation to acquire a lease on this blob.
string EndAcquireLease(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- string
The ID of the acquired lease.
EndBreakLease(IAsyncResult)
Ends an asynchronous operation to break the current lease on this blob.
TimeSpan EndBreakLease(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
EndChangeLease(IAsyncResult)
Ends an asynchronous operation to change the lease on this blob.
string EndChangeLease(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- string
The new lease ID.
EndDelete(IAsyncResult)
Ends an asynchronous operation to delete the blob.
void EndDelete(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndDeleteIfExists(IAsyncResult)
Returns the result of an asynchronous request to delete the blob if it already exists.
bool EndDeleteIfExists(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- bool
true
if the blob did not already exist and was created; otherwise,false
.
EndDownloadRangeToByteArray(IAsyncResult)
Ends an asynchronous operation to download a range of bytes from a blob to a byte array.
int EndDownloadRangeToByteArray(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- int
The total number of bytes read into the buffer.
EndDownloadRangeToStream(IAsyncResult)
Ends an asynchronous operation to download a range of bytes from a blob to a stream.
void EndDownloadRangeToStream(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndDownloadToByteArray(IAsyncResult)
Ends an asynchronous operation to download the contents of a blob to a byte array.
int EndDownloadToByteArray(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- int
The total number of bytes read into the buffer.
EndDownloadToFile(IAsyncResult)
Ends an asynchronous operation to download the contents of a blob to a file.
void EndDownloadToFile(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndDownloadToStream(IAsyncResult)
Ends an asynchronous operation to download the contents of a blob to a stream.
void EndDownloadToStream(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndExists(IAsyncResult)
Returns the asynchronous result of the request to check existence of the blob.
bool EndExists(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- bool
true
if the blob exists.
EndFetchAttributes(IAsyncResult)
Ends an asynchronous operation to populate the blob's properties and metadata.
void EndFetchAttributes(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndGetAccountProperties(IAsyncResult)
Ends an asynchronous operation to get properties for the account this blob resides on.
AccountProperties EndGetAccountProperties(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- AccountProperties
A AccountProperties object.
EndOpenRead(IAsyncResult)
Ends an asynchronous operation to open a stream for reading from the blob.
Stream EndOpenRead(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- Stream
A stream to be used for reading from the blob.
Remarks
On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.
EndReleaseLease(IAsyncResult)
Ends an asynchronous operation to release the lease on this blob.
void EndReleaseLease(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndRenewLease(IAsyncResult)
Ends an asynchronous operation to renew a lease on this blob.
void EndRenewLease(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndSetMetadata(IAsyncResult)
Ends an asynchronous operation to update the blob's metadata.
void EndSetMetadata(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndSetProperties(IAsyncResult)
Ends an asynchronous operation to update the blob's properties.
void EndSetProperties(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndUploadFromByteArray(IAsyncResult)
Ends an asynchronous operation to upload the contents of a byte array to a blob.
void EndUploadFromByteArray(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndUploadFromFile(IAsyncResult)
Ends an asynchronous operation to upload a file to a blob.
void EndUploadFromFile(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndUploadFromStream(IAsyncResult)
Ends an asynchronous operation to upload a stream to a blob.
void EndUploadFromStream(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Exists(BlobRequestOptions, OperationContext)
Checks existence of the blob.
bool Exists(BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
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
- bool
true
if the blob exists.
ExistsAsync()
Initiates an asynchronous operation to check existence of the blob.
Task<bool> ExistsAsync()
Returns
ExistsAsync(BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to check existence of the blob.
Task<bool> ExistsAsync(BlobRequestOptions options, OperationContext operationContext)
Parameters
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
ExistsAsync(BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to check existence of the blob.
Task<bool> ExistsAsync(BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
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
ExistsAsync(CancellationToken)
Initiates an asynchronous operation to check existence of the blob.
Task<bool> ExistsAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
FetchAttributes(AccessCondition, BlobRequestOptions, OperationContext)
Populates a blob's properties and metadata.
void FetchAttributes(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.
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.
FetchAttributesAsync()
Initiates an asynchronous operation to populate the blob's properties and metadata.
Task FetchAttributesAsync()
Returns
FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to populate the blob's properties and metadata.
Task FetchAttributesAsync(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.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to populate the blob's properties and metadata.
Task FetchAttributesAsync(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.
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
FetchAttributesAsync(CancellationToken)
Initiates an asynchronous operation to populate the blob's properties and metadata.
Task FetchAttributesAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
GetAccountProperties(BlobRequestOptions, OperationContext)
Gets properties for the account this blob resides on.
[DoesServiceRequest]
AccountProperties GetAccountProperties(BlobRequestOptions requestOptions = null, OperationContext operationContext = null)
Parameters
requestOptions
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- AccountProperties
An AccountProperties object.
GetAccountPropertiesAsync()
Initiates an asynchronous operation to get properties for the account this blob resides on.
[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync()
Returns
- Task<AccountProperties>
A Task<TResult> object of type AccountProperties that represents the asynchronous operation.
GetAccountPropertiesAsync(BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to get properties for the account this blob resides on.
[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync(BlobRequestOptions requestOptions, OperationContext operationContext)
Parameters
requestOptions
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<AccountProperties>
A Task<TResult> object of type AccountProperties that represents the asynchronous operation.
GetAccountPropertiesAsync(BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to get properties for the account this blob resides on.
[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync(BlobRequestOptions requestOptions, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
requestOptions
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<AccountProperties>
A Task<TResult> object of type AccountProperties that represents the asynchronous operation.
GetAccountPropertiesAsync(CancellationToken)
Initiates an asynchronous operation to get properties for the account this blob resides on.
[DoesServiceRequest]
Task<AccountProperties> GetAccountPropertiesAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<AccountProperties>
A Task<TResult> object of type AccountProperties that represents the asynchronous operation.
GetSharedAccessSignature(SharedAccessBlobPolicy)
Returns a shared access signature for the blob.
string GetSharedAccessSignature(SharedAccessBlobPolicy policy)
Parameters
policy
SharedAccessBlobPolicyA SharedAccessBlobPolicy object specifying the access policy for the shared access signature.
Returns
- string
A shared access signature, as a URI query string.
Remarks
The query string returned includes the leading question mark.
GetSharedAccessSignature(SharedAccessBlobPolicy, SharedAccessBlobHeaders)
Returns a shared access signature for the blob.
string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers)
Parameters
policy
SharedAccessBlobPolicyA SharedAccessBlobPolicy object specifying the access policy for the shared access signature.
headers
SharedAccessBlobHeadersA SharedAccessBlobHeaders object specifying optional header values to set for a blob accessed with this SAS.
Returns
- string
A shared access signature, as a URI query string.
GetSharedAccessSignature(SharedAccessBlobPolicy, SharedAccessBlobHeaders, string)
Returns a shared access signature for the blob.
string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, string groupPolicyIdentifier)
Parameters
policy
SharedAccessBlobPolicyA SharedAccessBlobPolicy object specifying the access policy for the shared access signature.
headers
SharedAccessBlobHeadersA SharedAccessBlobHeaders object specifying optional header values to set for a blob accessed with this SAS.
groupPolicyIdentifier
stringA string identifying a stored access policy.
Returns
- string
A shared access signature, as a URI query string.
GetSharedAccessSignature(SharedAccessBlobPolicy, SharedAccessBlobHeaders, string, SharedAccessProtocol?, IPAddressOrRange)
Returns a shared access signature for the blob.
string GetSharedAccessSignature(SharedAccessBlobPolicy policy, SharedAccessBlobHeaders headers, string groupPolicyIdentifier, SharedAccessProtocol? protocols, IPAddressOrRange ipAddressOrRange)
Parameters
policy
SharedAccessBlobPolicyA SharedAccessBlobPolicy object specifying the access policy for the shared access signature.
headers
SharedAccessBlobHeadersA SharedAccessBlobHeaders object specifying optional header values to set for a blob accessed with this SAS.
groupPolicyIdentifier
stringA string identifying a stored access policy.
protocols
SharedAccessProtocol?The allowed protocols (https only, or http and https). Null if you don't want to restrict protocol.
ipAddressOrRange
IPAddressOrRangeThe allowed IP address or IP address range. Null if you don't want to restrict based on IP address.
Returns
- string
A shared access signature, as a URI query string.
GetSharedAccessSignature(SharedAccessBlobPolicy, string)
Returns a shared access signature for the blob.
string GetSharedAccessSignature(SharedAccessBlobPolicy policy, string groupPolicyIdentifier)
Parameters
policy
SharedAccessBlobPolicyA SharedAccessBlobPolicy object specifying the access policy for the shared access signature.
groupPolicyIdentifier
stringA string identifying a stored access policy.
Returns
- string
A shared access signature, as a URI query string.
Remarks
The query string returned includes the leading question mark.
OpenRead(AccessCondition, BlobRequestOptions, OperationContext)
Opens a stream for reading from the blob.
Stream OpenRead(AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Stream
A stream to be used for reading from the blob.
Remarks
Note that this method always makes a call to the FetchAttributes(AccessCondition, BlobRequestOptions, OperationContext) method under the covers.
Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
OpenReadAsync()
Initiates an asynchronous operation to open a stream for reading from the blob.
Task<Stream> OpenReadAsync()
Returns
- Task<Stream>
A Task<TResult> object of type Stream that represents the asynchronous operation.
Remarks
On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to open a stream for reading from the blob.
Task<Stream> OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<Stream>
A Task<TResult> object of type Stream that represents the asynchronous operation.
Remarks
On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to open a stream for reading from the blob.
Task<Stream> OpenReadAsync(AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<Stream>
A Task<TResult> object of type Stream that represents the asynchronous operation.
Remarks
On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
OpenReadAsync(CancellationToken)
Initiates an asynchronous operation to open a stream for reading from the blob.
Task<Stream> OpenReadAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<Stream>
A Task<TResult> object of type Stream that represents the asynchronous operation.
Remarks
On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(byte[], int, int, AsyncCallback, object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.
ReleaseLease(AccessCondition, BlobRequestOptions, OperationContext)
Releases the lease on this blob.
void ReleaseLease(AccessCondition accessCondition, 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, including a required lease ID.
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.
ReleaseLeaseAsync(AccessCondition)
Initiates an asynchronous operation to release the lease on this blob.
Task ReleaseLeaseAsync(AccessCondition accessCondition)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
Returns
ReleaseLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to release the lease on this blob.
Task ReleaseLeaseAsync(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, including a required lease ID.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
ReleaseLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to release the lease on this blob.
Task ReleaseLeaseAsync(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, including a required lease ID.
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
ReleaseLeaseAsync(AccessCondition, CancellationToken)
Initiates an asynchronous operation to release the lease on this blob.
Task ReleaseLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
RenewLease(AccessCondition, BlobRequestOptions, OperationContext)
Renews a lease on this blob.
void RenewLease(AccessCondition accessCondition, 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, including a required lease ID.
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.
RenewLeaseAsync(AccessCondition)
Initiates an asynchronous operation to renew a lease on this blob.
Task RenewLeaseAsync(AccessCondition accessCondition)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
Returns
RenewLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to renew a lease on this blob.
Task RenewLeaseAsync(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, including a required lease ID.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
RenewLeaseAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to renew a lease on this blob.
Task RenewLeaseAsync(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, including a required lease ID.
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
RenewLeaseAsync(AccessCondition, CancellationToken)
Initiates an asynchronous operation to renew a lease on this blob.
Task RenewLeaseAsync(AccessCondition accessCondition, CancellationToken cancellationToken)
Parameters
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed, including a required lease ID.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetMetadata(AccessCondition, BlobRequestOptions, OperationContext)
Updates the blob's metadata.
void SetMetadata(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.
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.
SetMetadataAsync()
Initiates an asynchronous operation to update the blob's metadata.
Task SetMetadataAsync()
Returns
SetMetadataAsync(AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to update the blob's metadata.
Task SetMetadataAsync(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.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
SetMetadataAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to update the blob's metadata.
Task SetMetadataAsync(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.
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
SetMetadataAsync(CancellationToken)
Initiates an asynchronous operation to update the blob's metadata.
Task SetMetadataAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetProperties(AccessCondition, BlobRequestOptions, OperationContext)
Updates the blob's properties.
void SetProperties(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.
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.
SetPropertiesAsync()
Initiates an asynchronous operation to update the blob's properties.
Task SetPropertiesAsync()
Returns
SetPropertiesAsync(AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to update the blob's properties.
Task SetPropertiesAsync(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.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
SetPropertiesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to update the blob's properties.
Task SetPropertiesAsync(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.
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
SetPropertiesAsync(CancellationToken)
Initiates an asynchronous operation to update the blob's properties.
Task SetPropertiesAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)
Uploads the contents of a byte array to a blob.
void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromByteArrayAsync(byte[], int, int)
Initiates an asynchronous operation to upload the contents of a byte array to a blob.
Task UploadFromByteArrayAsync(byte[] buffer, int index, int count)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
Returns
UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload the contents of a byte array to a blob.
Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to a blob.
Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromByteArrayAsync(byte[], int, int, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to a blob.
Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a file to the Microsoft Azure Blob Service.
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.
UploadFromFileAsync(string)
Initiates an asynchronous operation to upload a file to a blob.
Task UploadFromFileAsync(string path)
Parameters
path
stringA string containing the file path providing the blob content.
Returns
UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a file to a blob.
Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
path
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a file to a blob.
Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
path
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromFileAsync(string, CancellationToken)
Initiates an asynchronous operation to upload a file to a blob.
Task UploadFromFileAsync(string path, CancellationToken cancellationToken)
Parameters
path
stringA string containing the file path providing the blob content.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to the Microsoft Azure Blob Service.
void UploadFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
source
StreamThe stream providing the blob content. Use a seek-able stream for optimal performance.
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.
UploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to the Microsoft Azure Blob Service.
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.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromStreamAsync(Stream)
Initiates an asynchronous operation to upload a stream to a blob.
Task UploadFromStreamAsync(Stream source)
Parameters
Returns
UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a stream to a blob.
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.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to a blob.
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.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, long)
Initiates an asynchronous operation to upload a stream to a block blob.
Task UploadFromStreamAsync(Stream source, long length)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
Returns
UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a stream to a blob.
Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to a blob.
Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, long, CancellationToken)
Initiates an asynchronous operation to upload a stream to a block blob.
Task UploadFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, CancellationToken)
Initiates an asynchronous operation to upload a stream to a blob.
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.