CloudPageBlob.WritePagesAsync Method (Stream, Int64, String, AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) (Microsoft.WindowsAzure.Storage.Blob)
From Microsoft Windows Azure Storage Blob
Initiates an asynchronous operation to write pages to a page blob.
Namespace:
Microsoft.WindowsAzure.Storage.Blob
Assembly:
Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
Syntax
[DoesServiceRequestAttribute]
public virtual Task WritePagesAsync(
Stream pageData,
long startOffset,
string contentMD5,
AccessCondition accessCondition,
BlobRequestOptions options,
OperationContext operationContext,
CancellationToken cancellationToken
)
C++
public:
[DoesServiceRequestAttribute]
virtual Task^ WritePagesAsync(
Stream^ pageData,
long long startOffset,
String^ contentMD5,
AccessCondition^ accessCondition,
BlobRequestOptions^ options,
OperationContext^ operationContext,
CancellationToken cancellationToken
)
[<DoesServiceRequestAttribute>]
abstract WritePagesAsync :
pageData:Stream *
startOffset:int64 *
contentMD5:string *
accessCondition:AccessCondition *
options:BlobRequestOptions *
operationContext:OperationContext *
cancellationToken:CancellationToken -> Task
[<DoesServiceRequestAttribute>]
override WritePagesAsync :
pageData:Stream *
startOffset:int64 *
contentMD5:string *
accessCondition:AccessCondition *
options:BlobRequestOptions *
operationContext:OperationContext *
cancellationToken:CancellationToken -> Task
<DoesServiceRequestAttribute>
Public Overridable Function WritePagesAsync (
pageData As Stream,
startOffset As Long,
contentMD5 As String,
accessCondition As AccessCondition,
options As BlobRequestOptions,
operationContext As OperationContext,
cancellationToken As CancellationToken
) As Task
Parameters
- pageData
-
Type:
System.IO.StreamSystem.IO::Stream^System.IO.StreamSystem.IO.Stream
A Stream object providing the page data.
- startOffset
-
Type:
System.Int64System::Int64System.Int64System.Int64
The offset at which to begin writing, in bytes. The offset must be a multiple of 512.
- contentMD5
-
Type:
System.StringSystem::String^System.StringSystem.String
An optional hash value used to ensure transactional integrity for the page. May be null or an empty string.
- accessCondition
-
Type:
Microsoft.WindowsAzure.Storage.AccessConditionMicrosoft.WindowsAzure.Storage::AccessCondition^Microsoft.WindowsAzure.Storage.AccessConditionMicrosoft.WindowsAzure.Storage.AccessCondition
An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.
- options
-
Type:
Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptionsMicrosoft.WindowsAzure.Storage.Blob::BlobRequestOptions^Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptionsMicrosoft.WindowsAzure.Storage.Blob.BlobRequestOptions
A BlobRequestOptions object that specifies additional options for the request.
- operationContext
-
Type:
Microsoft.WindowsAzure.Storage.OperationContextMicrosoft.WindowsAzure.Storage::OperationContext^Microsoft.WindowsAzure.Storage.OperationContextMicrosoft.WindowsAzure.Storage.OperationContext
An OperationContext object that represents the context for the current operation.
- cancellationToken
-
Type:
System.Threading.CancellationTokenSystem.Threading::CancellationTokenSystem.Threading.CancellationTokenSystem.Threading.CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Return Value
Type:
System.Threading.Tasks.TaskSystem.Threading.Tasks::Task^System.Threading.Tasks.TaskSystem.Threading.Tasks.TaskA Task object that represents 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 P:BlobRequestOptions.UseTransactionalMd5Referenced topic's target id should not be empty. Article id: ad21a784-cd8f-41a0-96a0-9e5c54be39c6, link: P: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.
Return to top
Initiates an asynchronous operation to write pages to a page blob.
Syntax
[DoesServiceRequestAttribute] public virtual Task WritePagesAsync( Stream pageData, long startOffset, string contentMD5, AccessCondition accessCondition, BlobRequestOptions options, OperationContext operationContext, CancellationToken cancellationToken )
public: [DoesServiceRequestAttribute] virtual Task^ WritePagesAsync( Stream^ pageData, long long startOffset, String^ contentMD5, AccessCondition^ accessCondition, BlobRequestOptions^ options, OperationContext^ operationContext, CancellationToken cancellationToken )
[<DoesServiceRequestAttribute>] abstract WritePagesAsync : pageData:Stream * startOffset:int64 * contentMD5:string * accessCondition:AccessCondition * options:BlobRequestOptions * operationContext:OperationContext * cancellationToken:CancellationToken -> Task [<DoesServiceRequestAttribute>] override WritePagesAsync : pageData:Stream * startOffset:int64 * contentMD5:string * accessCondition:AccessCondition * options:BlobRequestOptions * operationContext:OperationContext * cancellationToken:CancellationToken -> Task
<DoesServiceRequestAttribute> Public Overridable Function WritePagesAsync ( pageData As Stream, startOffset As Long, contentMD5 As String, accessCondition As AccessCondition, options As BlobRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken ) As Task
Parameters
- pageData
-
Type:
System.IO.StreamSystem.IO::Stream^System.IO.StreamSystem.IO.Stream
A Stream object providing the page data.
- startOffset
-
Type:
System.Int64System::Int64System.Int64System.Int64
The offset at which to begin writing, in bytes. The offset must be a multiple of 512.
- contentMD5
-
Type:
System.StringSystem::String^System.StringSystem.String
An optional hash value used to ensure transactional integrity for the page. May be null or an empty string.
- accessCondition
-
Type:
Microsoft.WindowsAzure.Storage.AccessConditionMicrosoft.WindowsAzure.Storage::AccessCondition^Microsoft.WindowsAzure.Storage.AccessConditionMicrosoft.WindowsAzure.Storage.AccessCondition
An AccessCondition object that represents the condition that must be met in order for the request to proceed. If null, no condition is used.
- options
-
Type:
Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptionsMicrosoft.WindowsAzure.Storage.Blob::BlobRequestOptions^Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptionsMicrosoft.WindowsAzure.Storage.Blob.BlobRequestOptions
A BlobRequestOptions object that specifies additional options for the request.
- operationContext
-
Type:
Microsoft.WindowsAzure.Storage.OperationContextMicrosoft.WindowsAzure.Storage::OperationContext^Microsoft.WindowsAzure.Storage.OperationContextMicrosoft.WindowsAzure.Storage.OperationContext
An OperationContext object that represents the context for the current operation.
- cancellationToken
-
Type:
System.Threading.CancellationTokenSystem.Threading::CancellationTokenSystem.Threading.CancellationTokenSystem.Threading.CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Return Value
Type: System.Threading.Tasks.TaskSystem.Threading.Tasks::Task^System.Threading.Tasks.TaskSystem.Threading.Tasks.TaskA Task object that represents 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 P:BlobRequestOptions.UseTransactionalMd5Referenced topic's target id should not be empty. Article id: ad21a784-cd8f-41a0-96a0-9e5c54be39c6, link: P: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.