CloudBlob.OpenReadAsync CloudBlob.OpenReadAsync CloudBlob.OpenReadAsync Method

Definition

Overloads

OpenReadAsync() OpenReadAsync() OpenReadAsync()

Initiates an asynchronous operation to open a stream for reading from the blob.

OpenReadAsync(CancellationToken) OpenReadAsync(CancellationToken)

Initiates an asynchronous operation to open a stream for reading from the blob.

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext) OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to open a stream for reading from the blob.

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to open a stream for reading from the blob.

OpenReadAsync() OpenReadAsync() OpenReadAsync()

Initiates an asynchronous operation to open a stream for reading from the blob.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync ();
abstract member OpenReadAsync : unit -> System.Threading.Tasks.Task<System.IO.Stream>
override this.OpenReadAsync : unit -> System.Threading.Tasks.Task<System.IO.Stream>
Public Overridable Function OpenReadAsync () As Task(Of Stream)
Returns

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

OpenReadAsync(CancellationToken) OpenReadAsync(CancellationToken)

Initiates an asynchronous operation to open a stream for reading from the blob.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (System.Threading.CancellationToken cancellationToken);
abstract member OpenReadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
override this.OpenReadAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
Parameters
cancellationToken
CancellationToken CancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext) OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext)

Initiates an asynchronous operation to open a stream for reading from the blob.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (Microsoft.WindowsAzure.Storage.AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, Microsoft.WindowsAzure.Storage.OperationContext operationContext);
abstract member OpenReadAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext -> System.Threading.Tasks.Task<System.IO.Stream>
override this.OpenReadAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext -> System.Threading.Tasks.Task<System.IO.Stream>
Parameters
accessCondition
AccessCondition AccessCondition 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
BlobRequestOptions BlobRequestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext OperationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to open a stream for reading from the blob.

[Microsoft.WindowsAzure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (Microsoft.WindowsAzure.Storage.AccessCondition accessCondition, Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions options, Microsoft.WindowsAzure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
abstract member OpenReadAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
override this.OpenReadAsync : Microsoft.WindowsAzure.Storage.AccessCondition * Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions * Microsoft.WindowsAzure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
Parameters
accessCondition
AccessCondition AccessCondition 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
BlobRequestOptions BlobRequestOptions BlobRequestOptions

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext OperationContext OperationContext

An OperationContext object that represents the context for the current operation.

cancellationToken
CancellationToken CancellationToken CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

A Task<TResult> object of type Stream that represents the asynchronous operation.

Remarks

On the Stream object returned by this method, the EndRead(IAsyncResult) method must be called exactly once for every BeginRead(Byte[], Int32, Int32, AsyncCallback, Object) call. Failing to end the read process before beginning another read process can cause unexpected behavior.

Note that this method always makes a call to the FetchAttributesAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken) method under the covers.

Set the StreamMinimumReadSizeInBytes property before calling this method to specify the minimum number of bytes to buffer when reading from the stream. The value must be at least 16 KB.

Applies to