Class CloudPageBlob
- Namespace
- Microsoft.WindowsAzure.Storage.Blob
- Assembly
- Microsoft.WindowsAzure.Storage.dll
Represents a Microsoft Azure page blob.
public class CloudPageBlob : CloudBlob, ICloudBlob, IListBlobItem
- Inheritance
-
CloudPageBlob
- Implements
- Inherited Members
Constructors
CloudPageBlob(StorageUri, DateTimeOffset?, StorageCredentials)
Initializes a new instance of the CloudPageBlob class using an absolute URI to the blob.
public CloudPageBlob(StorageUri blobAbsoluteUri, DateTimeOffset? snapshotTime, StorageCredentials credentials)
Parameters
blobAbsoluteUri
StorageUriThe absolute URI to the blob. The service assumes this is the URI for the blob in the primary location.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
credentials
StorageCredentialsA StorageCredentials object.
CloudPageBlob(StorageUri, DateTimeOffset?, CloudBlobClient)
Initializes a new instance of the CloudPageBlob class using an absolute URI to the blob.
public CloudPageBlob(StorageUri blobAbsoluteUri, DateTimeOffset? snapshotTime, CloudBlobClient client)
Parameters
blobAbsoluteUri
StorageUriThe absolute URI to the blob. The service assumes this is the URI for the blob in the primary location.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
client
CloudBlobClientA CloudBlobClient object.
CloudPageBlob(Uri)
Initializes a new instance of the CloudPageBlob class using an absolute URI to the blob.
public CloudPageBlob(Uri blobAbsoluteUri)
Parameters
blobAbsoluteUri
UriThe absolute URI to the blob.
CloudPageBlob(Uri, StorageCredentials)
Initializes a new instance of the CloudPageBlob class using an absolute URI to the blob.
public CloudPageBlob(Uri blobAbsoluteUri, StorageCredentials credentials)
Parameters
blobAbsoluteUri
UriThe absolute URI to the blob.
credentials
StorageCredentialsA StorageCredentials object.
CloudPageBlob(Uri, CloudBlobClient)
Initializes a new instance of the CloudPageBlob class using an absolute URI to the blob.
public CloudPageBlob(Uri blobAbsoluteUri, CloudBlobClient client)
Parameters
blobAbsoluteUri
UriThe absolute URI to the blob.
client
CloudBlobClientA CloudBlobClient object.
CloudPageBlob(Uri, DateTimeOffset?, StorageCredentials)
Initializes a new instance of the CloudPageBlob class using an absolute URI to the blob.
public CloudPageBlob(Uri blobAbsoluteUri, DateTimeOffset? snapshotTime, StorageCredentials credentials)
Parameters
blobAbsoluteUri
UriThe absolute URI to the blob.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
credentials
StorageCredentialsA StorageCredentials object.
CloudPageBlob(Uri, DateTimeOffset?, CloudBlobClient)
Initializes a new instance of the CloudPageBlob class using an absolute URI to the blob.
public CloudPageBlob(Uri blobAbsoluteUri, DateTimeOffset? snapshotTime, CloudBlobClient client)
Parameters
blobAbsoluteUri
UriThe absolute URI to the blob.
snapshotTime
DateTimeOffset?A DateTimeOffset specifying the snapshot timestamp, if the blob is a snapshot.
client
CloudBlobClientA CloudBlobClient object.
Properties
StreamWriteSizeInBytes
Gets or sets the number of bytes to buffer when writing to a page blob stream.
public int StreamWriteSizeInBytes { get; set; }
Property Value
- int
The number of bytes to buffer, ranging from between 512 bytes and 4 MB inclusive.
Methods
BeginClearPages(long, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to clear pages from a page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginClearPages(long startOffset, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
startOffset
longThe offset at which to begin clearing pages, in bytes. The offset must be a multiple of 512.
length
longThe length of the data range to be cleared, in bytes. The length must be a multiple of 512.
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.
BeginClearPages(long, long, AsyncCallback, object)
Begins an asynchronous operation to clear pages from a page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginClearPages(long startOffset, long length, AsyncCallback callback, object state)
Parameters
startOffset
longThe offset at which to begin clearing pages, in bytes. The offset must be a multiple of 512.
length
longThe length of the data range to be cleared, in bytes. The length must be a multiple of 512.
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.
BeginCreate(long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreate(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
size
longThe maximum size of the blob, in bytes.
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.
BeginCreate(long, AsyncCallback, object)
Begins an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, use BeginCreate(long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreate(long size, AsyncCallback callback, object state)
Parameters
size
longThe maximum size of the page blob, 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.
BeginCreate(long, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreate(long size, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
size
longThe maximum size of the blob, in bytes.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginCreateSnapshot(AsyncCallback, object)
Begins an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateSnapshot(AsyncCallback callback, object state)
Parameters
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginCreateSnapshot(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginCreateSnapshot(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginGetPageRanges(AsyncCallback, object)
Begins an asynchronous operation to return a collection of valid page ranges and their starting and ending bytes.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetPageRanges(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.
BeginGetPageRanges(long?, long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to return a collection of valid page ranges and their starting and ending bytes.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetPageRanges(long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
offset
long?The starting offset of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
length
long?The length of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
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.
BeginGetPageRangesDiff(DateTimeOffset, AsyncCallback, object)
Begins an asynchronous operation to return the collection of page ranges that differ between a specified snapshot and this object.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetPageRangesDiff(DateTimeOffset previousSnapshotTime, AsyncCallback callback, object state)
Parameters
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
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.
BeginGetPageRangesDiff(DateTimeOffset, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to return the collection of page ranges that differ between a specified snapshot and this object.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginGetPageRangesDiff(DateTimeOffset previousSnapshotTime, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
offset
long?The starting offset of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
length
long?The length of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
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.
BeginOpenWrite(long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to open a stream for writing to the blob. If the blob already exists, then existing data in the blob may be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginOpenWrite(long? size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
size
long?The size of the page blob, in bytes. The size must be a multiple of 512. If
null
, the page blob must already exist.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
Remarks
Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.
Set the StreamWriteSizeInBytes property before calling this method to specify the page size to write, in multiples of 512 bytes, ranging from between 512 and 4 MB inclusive.
To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
BeginOpenWrite(long?, AsyncCallback, object)
Begins an asynchronous operation to open a stream for writing to the blob. If the blob already exists, then existing data in the blob may be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginOpenWrite(long? size, AsyncCallback callback, object state)
Parameters
size
long?The size of the page blob, in bytes. The size must be a multiple of 512. If
null
, the page blob must already exist.callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
Remarks
Note that this method always makes a call to the BeginFetchAttributes(AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object) method under the covers.
Set the StreamWriteSizeInBytes property before calling this method to specify the page size to write, in multiples of 512 bytes, ranging from between 512 and 4 MB inclusive.
To throw an exception if the blob exists instead of overwriting it, see BeginOpenWrite(long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object).
BeginResize(long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to resize the page blob to the specified size.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginResize(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
size
longThe size of the blob, in bytes.
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.
BeginResize(long, AsyncCallback, object)
Begins an asynchronous operation to resize the page blob to the specified size.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginResize(long size, AsyncCallback callback, object state)
Parameters
size
longThe size of the page blob, 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.
BeginSetPremiumBlobTier(PremiumPageBlobTier, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to set the tier of the premium blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetPremiumBlobTier(PremiumPageBlobTier premiumPageBlobTier, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
premiumPageBlobTier
PremiumPageBlobTierA PremiumPageBlobTier representing the tier to set.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSetPremiumBlobTier(PremiumPageBlobTier, AsyncCallback, object)
Begins an asynchronous operation to set the tier of the premium blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetPremiumBlobTier(PremiumPageBlobTier premiumPageBlobTier, AsyncCallback callback, object state)
Parameters
premiumPageBlobTier
PremiumPageBlobTierA PremiumPageBlobTier representing the tier to set.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginSetSequenceNumber(SequenceNumberAction, long?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to set the page blob's sequence number.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetSequenceNumber(SequenceNumberAction sequenceNumberAction, long? sequenceNumber, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
ifsequenceNumberAction
is equal to SequenceNumberAction.Increment.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.
BeginSetSequenceNumber(SequenceNumberAction, long?, AsyncCallback, object)
Begins an asynchronous operation to set the page blob's sequence number.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginSetSequenceNumber(SequenceNumberAction sequenceNumberAction, long? sequenceNumber, AsyncCallback callback, object state)
Parameters
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
ifsequenceNumberAction
is equal to SequenceNumberAction.Increment.callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginStartCopy(CloudPageBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to start copying another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudPageBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginStartCopy(CloudPageBlob, AsyncCallback, object)
Begins an asynchronous operation to start copying another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudPageBlob source, AsyncCallback callback, object state)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source 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.
BeginStartCopy(CloudPageBlob, PremiumPageBlobTier?, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to start copying another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartCopy(CloudPageBlob source, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginStartIncrementalCopy(CloudPageBlob, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to start an incremental copy of another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartIncrementalCopy(CloudPageBlob sourceSnapshot, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
sourceSnapshot
CloudPageBlobThe CloudPageBlob that is the source blob which must be a snapshot.
destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginStartIncrementalCopy(CloudPageBlob, AsyncCallback, object)
Begins an asynchronous operation to start an incremental copy of another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartIncrementalCopy(CloudPageBlob sourceSnapshot, AsyncCallback callback, object state)
Parameters
sourceSnapshot
CloudPageBlobThe CloudPageBlob that is the source blob which must be a snapshot.
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.
BeginStartIncrementalCopy(Uri, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to start copying another blob's contents, properties, and metadata to this blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginStartIncrementalCopy(Uri sourceSnapshot, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
sourceSnapshot
UriThe System.Uri of the source blob which must be a snapshot.
destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromByteArray(byte[], int, int, AsyncCallback, object)
Begins an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, AsyncCallback callback, object state)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromByteArray(byte[], int, int, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromByteArray(byte[] buffer, int index, int count, PremiumPageBlobTier? premiumPageBlobTier, 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.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
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, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
path
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromFile(string, AsyncCallback, object)
Begins an asynchronous operation to upload a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromFile(string path, AsyncCallback callback, object state)
Parameters
path
stringA string containing the file path providing the blob content.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromFile(string, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromFile(string path, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
path
stringA string containing the file path providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
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, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longSpecifies the number of bytes from the Stream source to upload from the start position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, long, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longSpecifies the number of bytes from the Stream source to upload from the start position.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
BeginUploadFromStream(Stream, long, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, long length, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
length
longSpecifies the number of bytes from the Stream source to upload from the start position.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
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, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginUploadFromStream(Stream source, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
source
StreamA Stream object providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
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.
BeginWritePages(Stream, long, string, AccessCondition, BlobRequestOptions, OperationContext, AsyncCallback, object)
Begins an asynchronous operation to write pages to a page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginWritePages(Stream pageData, long startOffset, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, AsyncCallback callback, object state)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.
BeginWritePages(Stream, long, string, AsyncCallback, object)
Begins an asynchronous operation to write pages to a page blob.
[DoesServiceRequest]
public virtual ICancellableAsyncResult BeginWritePages(Stream pageData, long startOffset, string contentMD5, AsyncCallback callback, object state)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.callback
AsyncCallbackAn AsyncCallback delegate that will receive notification when the asynchronous operation completes.
state
objectA user-defined object that will be passed to the callback delegate.
Returns
- ICancellableAsyncResult
An ICancellableAsyncResult that references the asynchronous operation.
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.
ClearPages(long, long, AccessCondition, BlobRequestOptions, OperationContext)
Clears pages from a page blob.
[DoesServiceRequest]
public virtual void ClearPages(long startOffset, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
startOffset
longThe offset at which to begin clearing pages, in bytes. The offset must be a multiple of 512.
length
longThe length of the data range to be cleared, in bytes. The length must be a multiple of 512.
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.
ClearPagesAsync(long, long)
Initiates an asynchronous operation to clear pages from a page blob.
[DoesServiceRequest]
public virtual Task ClearPagesAsync(long startOffset, long length)
Parameters
startOffset
longThe offset at which to begin clearing pages, in bytes. The offset must be a multiple of 512.
length
longThe length of the data range to be cleared, in bytes. The length must be a multiple of 512.
Returns
ClearPagesAsync(long, long, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to clear pages from a page blob.
[DoesServiceRequest]
public virtual Task ClearPagesAsync(long startOffset, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
startOffset
longThe offset at which to begin clearing pages, in bytes. The offset must be a multiple of 512.
length
longThe length of the data range to be cleared, in bytes. The length must be a multiple of 512.
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
ClearPagesAsync(long, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to clear pages from a page blob.
[DoesServiceRequest]
public virtual Task ClearPagesAsync(long startOffset, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
startOffset
longThe offset at which to begin clearing pages, in bytes. The offset must be a multiple of 512.
length
longThe length of the data range to be cleared, in bytes. The length must be a multiple of 512.
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
ClearPagesAsync(long, long, CancellationToken)
Initiates an asynchronous operation to clear pages from a page blob.
[DoesServiceRequest]
public virtual Task ClearPagesAsync(long startOffset, long length, CancellationToken cancellationToken)
Parameters
startOffset
longThe offset at which to begin clearing pages, in bytes. The offset must be a multiple of 512.
length
longThe length of the data range to be cleared, in bytes. The length must be a multiple of 512.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
Create(long, AccessCondition, BlobRequestOptions, OperationContext)
Creates a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual void Create(long size, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
size
longThe maximum size of the page blob, in bytes.
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.
Create(long, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext)
Creates a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual void Create(long size, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
size
longThe maximum size of the page blob, in bytes.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
CreateAsync(long)
Initiates an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, use CreateAsync(long, AccessCondition, BlobRequestOptions, OperationContext).
[DoesServiceRequest]
public virtual Task CreateAsync(long size)
Parameters
size
longThe maximum size of the blob, in bytes.
Returns
CreateAsync(long, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual Task CreateAsync(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
size
longThe maximum size of the blob, in bytes.
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
CreateAsync(long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual Task CreateAsync(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
size
longThe maximum size of the blob, in bytes.
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
CreateAsync(long, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
[DoesServiceRequest]
public virtual Task CreateAsync(long size, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
size
longThe maximum size of the blob, in bytes.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
CreateAsync(long, CancellationToken)
Initiates an asynchronous operation to create a page blob. If the blob already exists, this operation will overwrite it. To throw an exception if the blob exists, instead of overwriting, use CreateAsync(long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
[DoesServiceRequest]
public virtual Task CreateAsync(long size, CancellationToken cancellationToken)
Parameters
size
longThe maximum size of the blob, in bytes.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
CreateSnapshot(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext)
Creates a snapshot of the blob.
[DoesServiceRequest]
public virtual CloudPageBlob CreateSnapshot(IDictionary<string, string> metadata = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
. Ifnull
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- CloudPageBlob
A CloudPageBlob object that is a blob snapshot.
CreateSnapshotAsync()
Initiates an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual Task<CloudPageBlob> CreateSnapshotAsync()
Returns
- Task<CloudPageBlob>
A Task<TResult> object of type CloudPageBlob that represents the asynchronous operation.
CreateSnapshotAsync(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual Task<CloudPageBlob> CreateSnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<CloudPageBlob>
A Task<TResult> object of type CloudPageBlob that represents the asynchronous operation.
CreateSnapshotAsync(IDictionary<string, string>, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual Task<CloudPageBlob> CreateSnapshotAsync(IDictionary<string, string> metadata, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
metadata
IDictionary<string, string>A collection of name-value pairs defining the metadata of the snapshot.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<CloudPageBlob>
A Task<TResult> object of type CloudPageBlob that represents the asynchronous operation.
CreateSnapshotAsync(CancellationToken)
Initiates an asynchronous operation to create a snapshot of the blob.
[DoesServiceRequest]
public virtual Task<CloudPageBlob> CreateSnapshotAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<CloudPageBlob>
A Task<TResult> object of type CloudPageBlob that represents the asynchronous operation.
EndClearPages(IAsyncResult)
Ends an asynchronous operation to clear pages from a page blob.
public virtual void EndClearPages(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndCreate(IAsyncResult)
Ends an asynchronous operation to create a page blob.
public virtual void EndCreate(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndCreateSnapshot(IAsyncResult)
Ends an asynchronous operation to create a snapshot of the blob.
public virtual CloudPageBlob EndCreateSnapshot(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- CloudPageBlob
A CloudPageBlob object that is a blob snapshot.
EndGetPageRanges(IAsyncResult)
Ends an asynchronous operation to return a collection of valid page ranges and their starting and ending bytes.
public virtual IEnumerable<PageRange> EndGetPageRanges(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- IEnumerable<PageRange>
An enumerable collection of page ranges.
EndGetPageRangesDiff(IAsyncResult)
Ends an asynchronous operation to return the collection of page ranges that differ between a specified snapshot and this object.
public virtual IEnumerable<PageDiffRange> EndGetPageRangesDiff(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- IEnumerable<PageDiffRange>
An enumerable collection of page ranges.
EndOpenWrite(IAsyncResult)
Ends an asynchronous operation to open a stream for writing to the blob.
public virtual CloudBlobStream EndOpenWrite(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- CloudBlobStream
A CloudBlobStream object.
EndResize(IAsyncResult)
Ends an asynchronous operation to resize the page blob.
public virtual void EndResize(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndSetPremiumBlobTier(IAsyncResult)
Ends an asynchronous operation to set the tier of the premium blob.
public virtual void EndSetPremiumBlobTier(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndSetSequenceNumber(IAsyncResult)
Ends an asynchronous operation to set the page blob's sequence number.
public virtual void EndSetSequenceNumber(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndStartIncrementalCopy(IAsyncResult)
Ends an asynchronous operation to start an incremental copy of another blob's contents, properties, and metadata to this blob.
public virtual string EndStartIncrementalCopy(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
Returns
- string
A string containing the copy ID associated with the copy operation.
Remarks
This method fetches the blob's ETag, last-modified time, and part of the copy state. The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
EndUploadFromByteArray(IAsyncResult)
Ends an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
public virtual void EndUploadFromByteArray(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndUploadFromFile(IAsyncResult)
Ends an asynchronous operation to upload a file to a page blob.
public virtual void EndUploadFromFile(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndUploadFromStream(IAsyncResult)
Ends an asynchronous operation to upload a stream to a page blob.
public virtual void EndUploadFromStream(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
EndWritePages(IAsyncResult)
Ends an asynchronous operation to write pages to a page blob.
public virtual void EndWritePages(IAsyncResult asyncResult)
Parameters
asyncResult
IAsyncResultAn IAsyncResult that references the pending asynchronous operation.
GetPageRanges(long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Gets a collection of valid page ranges and their starting and ending bytes.
[DoesServiceRequest]
public virtual IEnumerable<PageRange> GetPageRanges(long? offset = null, long? length = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
offset
long?The starting offset of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
length
long?The length of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- IEnumerable<PageRange>
An enumerable collection of page ranges.
GetPageRangesAsync()
Initiates an asynchronous operation to return a collection of page ranges and their starting and ending bytes.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageRange>> GetPageRangesAsync()
Returns
- Task<IEnumerable<PageRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
GetPageRangesAsync(long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to return a collection of page ranges and their starting and ending bytes.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageRange>> GetPageRangesAsync(long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
offset
long?The starting offset of the data range, in bytes. Must be a multiple of 512.
length
long?The length of the data range, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<IEnumerable<PageRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
GetPageRangesAsync(long?, long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to return a collection of page ranges and their starting and ending bytes.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageRange>> GetPageRangesAsync(long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
offset
long?The starting offset of the data range, in bytes. Must be a multiple of 512.
length
long?The length of the data range, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<IEnumerable<PageRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
GetPageRangesAsync(CancellationToken)
Initiates an asynchronous operation to return a collection of page ranges and their starting and ending bytes.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageRange>> GetPageRangesAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<IEnumerable<PageRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
GetPageRangesDiff(DateTimeOffset, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Gets the collection of page ranges that differ between a specified snapshot and this object.
[DoesServiceRequest]
public virtual IEnumerable<PageDiffRange> GetPageRangesDiff(DateTimeOffset previousSnapshotTime, long? offset = null, long? length = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
offset
long?The starting offset of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
length
long?The length of the data range over which to list page ranges, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- IEnumerable<PageDiffRange>
An enumerable collection of page ranges.
GetPageRangesDiffAsync(DateTimeOffset)
Initiates an asynchronous operation to return the collection of page ranges that differ between a specified snapshot and this object.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageDiffRange>> GetPageRangesDiffAsync(DateTimeOffset previousSnapshotTime)
Parameters
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
Returns
- Task<IEnumerable<PageDiffRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
GetPageRangesDiffAsync(DateTimeOffset, long?, long?, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to return the collection of page ranges that differ between a specified snapshot and this object.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageDiffRange>> GetPageRangesDiffAsync(DateTimeOffset previousSnapshotTime, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
offset
long?The starting offset of the data range, in bytes. Must be a multiple of 512.
length
long?The length of the data range, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<IEnumerable<PageDiffRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
GetPageRangesDiffAsync(DateTimeOffset, long?, long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to return the collection of page ranges that differ between a specified snapshot and this object.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageDiffRange>> GetPageRangesDiffAsync(DateTimeOffset previousSnapshotTime, long? offset, long? length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
offset
long?The starting offset of the data range, in bytes. Must be a multiple of 512.
length
long?The length of the data range, in bytes. Must be a multiple of 512.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<IEnumerable<PageDiffRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
GetPageRangesDiffAsync(DateTimeOffset, CancellationToken)
Initiates an asynchronous operation to return the collection of page ranges that differ between a specified snapshot and this object.
[DoesServiceRequest]
public virtual Task<IEnumerable<PageDiffRange>> GetPageRangesDiffAsync(DateTimeOffset previousSnapshotTime, CancellationToken cancellationToken)
Parameters
previousSnapshotTime
DateTimeOffsetA DateTimeOffset representing the snapshot timestamp to use as the starting point for the diff. If this CloudPageBlob represents a snapshot, the previousSnapshotTime parameter must be prior to the current snapshot timestamp.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<IEnumerable<PageDiffRange>>
A Task<TResult> object that is an enumerable collection of type PageRange that represents the asynchronous operation.
OpenWrite(long?, AccessCondition, BlobRequestOptions, OperationContext)
Opens a stream for writing to the blob. If the blob already exists, then existing data in the blob may be overwritten.
[DoesServiceRequest]
public virtual CloudBlobStream OpenWrite(long? size, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
size
long?The size of the page blob, in bytes. The size must be a multiple of 512. If
null
, the page blob must already exist.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- CloudBlobStream
A CloudBlobStream object.
Remarks
Note that this method always makes a call to the FetchAttributes(AccessCondition, BlobRequestOptions, OperationContext) method under the covers.
Set the StreamWriteSizeInBytes property before calling this method to specify the block size to write, in bytes, ranging from between 16 KB and 4 MB inclusive.
To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
OpenWriteAsync(long?)
Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, then existing data in the blob may be overwritten.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(long? size)
Parameters
size
long?The size of the page blob, in bytes. The size must be a multiple of 512. If
null
, the page blob must already exist.
Returns
- Task<CloudBlobStream>
A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.
Remarks
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamWriteSizeInBytes property before calling this method to specify the page size to write, in multiples of 512 bytes, ranging from between 512 and 4 MB inclusive.
To throw an exception if the blob exists instead of overwriting it, see OpenWriteAsync(long?, AccessCondition, BlobRequestOptions, OperationContext).
OpenWriteAsync(long?, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, then existing data in the blob may be overwritten.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(long? size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
size
long?The size of the page blob, in bytes. The size must be a multiple of 512. If
null
, the page blob must already exist.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<CloudBlobStream>
A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.
Remarks
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamWriteSizeInBytes property before calling this method to specify the page size to write, in multiples of 512 bytes, ranging from between 512 and 4 MB inclusive.
To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
OpenWriteAsync(long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, then existing data in the blob may be overwritten.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(long? size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
size
long?The size of the page blob, in bytes. The size must be a multiple of 512. If
null
, the page blob must already exist.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<CloudBlobStream>
A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.
Remarks
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamWriteSizeInBytes property before calling this method to specify the page size to write, in multiples of 512 bytes, ranging from between 512 and 4 MB inclusive.
To throw an exception if the blob exists instead of overwriting it, pass in an AccessCondition object generated using GenerateIfNotExistsCondition().
OpenWriteAsync(long?, CancellationToken)
Initiates an asynchronous operation to open a stream for writing to the blob. If the blob already exists, then existing data in the blob may be overwritten.
[DoesServiceRequest]
public virtual Task<CloudBlobStream> OpenWriteAsync(long? size, CancellationToken cancellationToken)
Parameters
size
long?The size of the page blob, in bytes. The size must be a multiple of 512. If
null
, the page blob must already exist.cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<CloudBlobStream>
A Task<TResult> object of type CloudBlobStream that represents the asynchronous operation.
Remarks
Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.
Set the StreamWriteSizeInBytes property before calling this method to specify the page size to write, in multiples of 512 bytes, ranging from between 512 and 4 MB inclusive.
To throw an exception if the blob exists instead of overwriting it, see OpenWriteAsync(long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken).
Resize(long, AccessCondition, BlobRequestOptions, OperationContext)
Resizes the page blob to the specified size.
[DoesServiceRequest]
public virtual void Resize(long size, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
size
longThe size of the page blob, in bytes.
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.
ResizeAsync(long)
Initiates an asynchronous operation to resize the page blob to the specified size.
[DoesServiceRequest]
public virtual Task ResizeAsync(long size)
Parameters
size
longThe size of the blob, in bytes.
Returns
ResizeAsync(long, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to resize the page blob to the specified size.
[DoesServiceRequest]
public virtual Task ResizeAsync(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
size
longThe size of the blob, in bytes.
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
ResizeAsync(long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to resize the page blob to the specified size.
[DoesServiceRequest]
public virtual Task ResizeAsync(long size, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
size
longThe size of the blob, in bytes.
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
ResizeAsync(long, CancellationToken)
Initiates an asynchronous operation to resize the page blob to the specified size.
[DoesServiceRequest]
public virtual Task ResizeAsync(long size, CancellationToken cancellationToken)
Parameters
size
longThe size of the blob, in bytes.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetPremiumBlobTier(PremiumPageBlobTier, BlobRequestOptions, OperationContext)
Sets the tier of the premium blob.
[DoesServiceRequest]
public virtual void SetPremiumBlobTier(PremiumPageBlobTier premiumPageBlobTier, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
premiumPageBlobTier
PremiumPageBlobTierA PremiumPageBlobTier representing the tier to set.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request, or
null
. Ifnull
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
SetPremiumBlobTierAsync(PremiumPageBlobTier)
Initiates an asynchronous operation to set the tier of the premium blob.
[DoesServiceRequest]
public virtual Task SetPremiumBlobTierAsync(PremiumPageBlobTier premiumPageBlobTier)
Parameters
premiumPageBlobTier
PremiumPageBlobTierA PremiumPageBlobTier representing the tier to set.
Returns
SetPremiumBlobTierAsync(PremiumPageBlobTier, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to set the tier of the premium blob.
[DoesServiceRequest]
public virtual Task SetPremiumBlobTierAsync(PremiumPageBlobTier premiumPageBlobTier, BlobRequestOptions options, OperationContext operationContext)
Parameters
premiumPageBlobTier
PremiumPageBlobTierA PremiumPageBlobTier representing the tier to set.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
SetPremiumBlobTierAsync(PremiumPageBlobTier, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to set the premium tier of the blob.
[DoesServiceRequest]
public virtual Task SetPremiumBlobTierAsync(PremiumPageBlobTier premiumPageBlobTier, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
premiumPageBlobTier
PremiumPageBlobTierA PremiumPageBlobTier representing the tier to set.
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
SetPremiumBlobTierAsync(PremiumPageBlobTier, CancellationToken)
Initiates an asynchronous operation to set the tier of the premium blob.
[DoesServiceRequest]
public virtual Task SetPremiumBlobTierAsync(PremiumPageBlobTier premiumPageBlobTier, CancellationToken cancellationToken)
Parameters
premiumPageBlobTier
PremiumPageBlobTierA PremiumPageBlobTier representing the tier to set.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
SetSequenceNumber(SequenceNumberAction, long?, AccessCondition, BlobRequestOptions, OperationContext)
Sets the page blob's sequence number.
[DoesServiceRequest]
public virtual void SetSequenceNumber(SequenceNumberAction sequenceNumberAction, long? sequenceNumber, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
ifsequenceNumberAction
is equal to SequenceNumberAction.Increment.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.
SetSequenceNumberAsync(SequenceNumberAction, long?)
Initiates an asynchronous operation to set the page blob's sequence number.
[DoesServiceRequest]
public virtual Task SetSequenceNumberAsync(SequenceNumberAction sequenceNumberAction, long? sequenceNumber)
Parameters
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
ifsequenceNumberAction
is equal to SequenceNumberAction.Increment.
Returns
SetSequenceNumberAsync(SequenceNumberAction, long?, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to set the page blob's sequence number.
[DoesServiceRequest]
public virtual Task SetSequenceNumberAsync(SequenceNumberAction sequenceNumberAction, long? sequenceNumber, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
ifsequenceNumberAction
is equal to SequenceNumberAction.Increment.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
SetSequenceNumberAsync(SequenceNumberAction, long?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to set the page blob's sequence number.
[DoesServiceRequest]
public virtual Task SetSequenceNumberAsync(SequenceNumberAction sequenceNumberAction, long? sequenceNumber, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
ifsequenceNumberAction
is equal to SequenceNumberAction.Increment.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
SetSequenceNumberAsync(SequenceNumberAction, long?, CancellationToken)
Initiates an asynchronous operation to set the page blob's sequence number.
[DoesServiceRequest]
public virtual Task SetSequenceNumberAsync(SequenceNumberAction sequenceNumberAction, long? sequenceNumber, CancellationToken cancellationToken)
Parameters
sequenceNumberAction
SequenceNumberActionA value of type SequenceNumberAction, indicating the operation to perform on the sequence number.
sequenceNumber
long?The sequence number. Set this parameter to
null
ifsequenceNumberAction
is equal to SequenceNumberAction.Increment.cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
StartCopy(CloudPageBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)
Begins an operation to start copying another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual string StartCopy(CloudPageBlob source, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- string
The copy ID associated with the copy operation.
Remarks
This method fetches the blob's ETag, last-modified time, and part of the copy state. The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
StartCopy(CloudPageBlob, PremiumPageBlobTier?, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)
Begins an operation to start copying another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual string StartCopy(CloudPageBlob source, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition sourceAccessCondition = null, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- string
The copy ID associated with the copy operation.
Remarks
This method fetches the blob's ETag, last-modified time, and part of the copy state. The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
StartCopyAsync(CloudPageBlob)
Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudPageBlob source)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartCopyAsync(CloudPageBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudPageBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartCopyAsync(CloudPageBlob, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudPageBlob source, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartCopyAsync(CloudPageBlob, PremiumPageBlobTier?, AccessCondition, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudPageBlob source, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition sourceAccessCondition, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
sourceAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the source blob. If
null
, no condition is used.destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartCopyAsync(CloudPageBlob, CancellationToken)
Initiates an asynchronous operation to start copying another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartCopyAsync(CloudPageBlob source, CancellationToken cancellationToken)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartIncrementalCopy(CloudPageBlob, AccessCondition, BlobRequestOptions, OperationContext)
Begins an operation to start an incremental copy of another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual string StartIncrementalCopy(CloudPageBlob sourceSnapshot, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
sourceSnapshot
CloudPageBlobThe CloudPageBlob that is the source blob which must be a snapshot.
destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- string
The copy ID associated with the copy operation.
Remarks
This method fetches the blob's ETag, last-modified time, and part of the copy state. The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
StartIncrementalCopy(Uri, AccessCondition, BlobRequestOptions, OperationContext)
Begins an operation to start an incremental copy of another page blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual string StartIncrementalCopy(Uri sourceSnapshotUri, AccessCondition destAccessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
sourceSnapshotUri
UriThe System.Uri of the source blob which must be a snapshot.
destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- string
The copy ID associated with the copy operation.
Remarks
This method fetches the blob's ETag, last-modified time, and part of the copy state. The copy ID and copy status fields are fetched, and the rest of the copy state is cleared.
StartIncrementalCopyAsync(CloudPageBlob)
Initiates an asynchronous operation to start an incremental copy of another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartIncrementalCopyAsync(CloudPageBlob source)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob which must be a snapshot.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartIncrementalCopyAsync(CloudPageBlob, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to start an incremental copy of another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartIncrementalCopyAsync(CloudPageBlob source, AccessCondition destAccessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob which must be a snapshot.
destAccessCondition
AccessConditionAn AccessCondition object that represents the access conditions for the destination blob. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
StartIncrementalCopyAsync(CloudPageBlob, CancellationToken)
Initiates an asynchronous operation to start an incremental copy of another blob's contents, properties, and metadata to this page blob.
[DoesServiceRequest]
public virtual Task<string> StartIncrementalCopyAsync(CloudPageBlob source, CancellationToken cancellationToken)
Parameters
source
CloudPageBlobThe CloudPageBlob that is the source blob which must be a snapshot.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
- Task<string>
A Task<TResult> object of type
string
that represents the asynchronous operation.
UploadFromByteArray(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)
Uploads the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromByteArray(byte[] buffer, int index, int count, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromByteArray(byte[], int, int, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext)
Uploads the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromByteArray(byte[] buffer, int index, int count, PremiumPageBlobTier? premiumPageBlobTier, 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.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
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 page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
Returns
UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromByteArrayAsync(byte[], int, int, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromByteArrayAsync(byte[], int, int, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromByteArrayAsync(byte[], int, int, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload the contents of a byte array to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, PremiumPageBlobTier? premiumPageBlobTier, 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.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
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 page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromByteArrayAsync(byte[] buffer, int index, int count, CancellationToken cancellationToken)
Parameters
buffer
byte[]An array of bytes.
index
intThe zero-based byte offset in buffer at which to begin uploading bytes to the blob.
count
intThe number of bytes to be written to the blob.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromFile(string, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromFile(string path, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
path
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromFile(string, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromFile(string path, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
path
stringA string containing the file path providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
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 page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path)
Parameters
path
stringA string containing the file path providing the blob content.
Returns
UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
path
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromFileAsync(string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
path
stringA string containing the file path providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromFileAsync(string, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Parameters
path
stringA string containing the file path providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed.
options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromFileAsync(string, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a file to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
path
stringA string containing the file path providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
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 page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromFileAsync(string path, CancellationToken cancellationToken)
Parameters
path
stringA string containing the file path providing the blob content.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStream(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromStream(Stream source, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
source
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromStream(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromStream(Stream source, long length, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromStream(Stream, long, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromStream(Stream source, long length, PremiumPageBlobTier? premiumPageBlobTier, 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.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromStream(Stream, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext)
Uploads a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual void UploadFromStream(Stream source, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
source
StreamA Stream object providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
UploadFromStreamAsync(Stream)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source)
Parameters
Returns
UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
source
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromStreamAsync(Stream, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, long)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
Returns
UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
UploadFromStreamAsync(Stream, long, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, long, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, long, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, PremiumPageBlobTier? premiumPageBlobTier, 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.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, long, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, long length, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
length
longThe number of bytes to write from the source stream at its current position.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, PremiumPageBlobTier?, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, PremiumPageBlobTier? premiumPageBlobTier, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
premiumPageBlobTier
PremiumPageBlobTier?A PremiumPageBlobTier representing the tier to set.
accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
UploadFromStreamAsync(Stream, CancellationToken)
Initiates an asynchronous operation to upload a stream to a page blob. If the blob already exists, it will be overwritten.
[DoesServiceRequest]
public virtual Task UploadFromStreamAsync(Stream source, CancellationToken cancellationToken)
Parameters
source
StreamA Stream object providing the blob content.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
WritePages(Stream, long, string, AccessCondition, BlobRequestOptions, OperationContext)
Writes pages to a page blob.
[DoesServiceRequest]
public virtual void WritePages(Stream pageData, long startOffset, string contentMD5 = null, AccessCondition accessCondition = null, BlobRequestOptions options = null, OperationContext operationContext = null)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request. If
null
, default options are applied to the request.operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.
WritePagesAsync(Stream, long, string)
Initiates an asynchronous operation to write pages to a page blob.
[DoesServiceRequest]
public virtual Task WritePagesAsync(Stream pageData, long startOffset, string contentMD5)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.
Returns
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.
WritePagesAsync(Stream, long, string, AccessCondition, BlobRequestOptions, OperationContext)
Initiates an asynchronous operation to write pages to a page blob.
[DoesServiceRequest]
public virtual Task WritePagesAsync(Stream pageData, long startOffset, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.
WritePagesAsync(Stream, long, string, AccessCondition, BlobRequestOptions, OperationContext, IProgress<StorageProgress>, CancellationToken)
Initiates an asynchronous operation to write pages to a page blob.
[DoesServiceRequest]
public virtual Task WritePagesAsync(Stream pageData, long startOffset, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, IProgress<StorageProgress> progressHandler, CancellationToken cancellationToken)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
progressHandler
IProgress<StorageProgress>A IProgress<T> object to handle StorageProgress messages.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.
WritePagesAsync(Stream, long, string, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to write pages to a page blob.
[DoesServiceRequest]
public virtual Task WritePagesAsync(Stream pageData, long startOffset, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.accessCondition
AccessConditionAn AccessCondition object that represents the condition that must be met in order for the request to proceed. If
null
, no condition is used.options
BlobRequestOptionsA BlobRequestOptions object that specifies additional options for the request.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.
WritePagesAsync(Stream, long, string, CancellationToken)
Initiates an asynchronous operation to write pages to a page blob.
[DoesServiceRequest]
public virtual Task WritePagesAsync(Stream pageData, long startOffset, string contentMD5, CancellationToken cancellationToken)
Parameters
pageData
StreamA Stream object providing the page data.
startOffset
longThe offset at which to begin writing, in bytes. The offset must be a multiple of 512.
contentMD5
stringAn optional hash value used to ensure transactional integrity for the page. May be
null
or an empty string.cancellationToken
CancellationTokenA CancellationToken to observe while waiting for a task to complete.
Returns
Remarks
Clients may send the Content-MD5 header for a given Write Pages operation as a means to ensure transactional integrity over the wire.
The contentMD5
parameter permits clients who already have access to a pre-computed MD5 value for a given byte range to provide it.
If the BlobRequestOptions.UseTransactionalMd5 property is set to true
and the contentMD5
parameter is set
to null
, then the client library will calculate the MD5 value internally.