共用方式為


ICloudBlob.OpenReadAsync Method

Definition

Overloads

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

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

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext)

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

OpenReadAsync(CancellationToken)

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

OpenReadAsync()

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

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext, CancellationToken)

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

public System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.Blob.BlobRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
abstract member OpenReadAsync : Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.IO.Stream>
Public Function OpenReadAsync (accessCondition As AccessCondition, options As BlobRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of Stream)

Parameters

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

A BlobRequestOptions object that specifies additional options for the request.

operationContext
OperationContext

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

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

OpenReadAsync(AccessCondition, BlobRequestOptions, OperationContext)

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

public System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync (Microsoft.Azure.Storage.AccessCondition accessCondition, Microsoft.Azure.Storage.Blob.BlobRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
abstract member OpenReadAsync : Microsoft.Azure.Storage.AccessCondition * Microsoft.Azure.Storage.Blob.BlobRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<System.IO.Stream>
Public Function OpenReadAsync (accessCondition As AccessCondition, options As BlobRequestOptions, operationContext As OperationContext) As Task(Of Stream)

Parameters

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

A BlobRequestOptions object that specifies additional options for the request.

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.

Applies to

OpenReadAsync(CancellationToken)

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

public 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>
Public Function OpenReadAsync (cancellationToken As CancellationToken) As Task(Of Stream)

Parameters

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

OpenReadAsync()

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

public System.Threading.Tasks.Task<System.IO.Stream> OpenReadAsync ();
abstract member OpenReadAsync : unit -> System.Threading.Tasks.Task<System.IO.Stream>
Public 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.

Applies to