CloudPageBlob.BeginOpenWrite Method (Nullable<Int64>, AsyncCallback, Object)

 

Updated: August 4, 2016

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.

Namespace:   Microsoft.WindowsAzure.Storage.Blob
Assembly:  Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)

[DoesServiceRequestAttribute]
public virtual ICancellableAsyncResult BeginOpenWrite(
	Nullable<long> size,
	AsyncCallback callback,
	object state
)

Parameters

size
Type: System.Nullable<Int64>

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
Type: System.AsyncCallback

An AsyncCallback delegate that will receive notification when the asynchronous operation completes.

state
Type: System.Object

A user-defined object that will be passed to the callback delegate.

Return Value

Type: Microsoft.WindowsAzure.Storage.ICancellableAsyncResult

An ICancellableAsyncResult that references the asynchronous operation.

Note that this method always makes a call to the BeginFetchAttributes 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.

Return to top
Show: