CloudQueue.PeekMessageAsync Method

Definition

Overloads

PeekMessageAsync()

Initiates an asynchronous operation to get a single message from the queue.

PeekMessageAsync(CancellationToken)

Initiates an asynchronous operation to get a single message from the queue.

PeekMessageAsync(QueueRequestOptions, OperationContext)

Initiates an asynchronous operation to get a single message from the queue.

PeekMessageAsync(QueueRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get a single message from the queue.

PeekMessageAsync()

Initiates an asynchronous operation to get a single message from the queue.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> PeekMessageAsync ();
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member PeekMessageAsync : unit -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.PeekMessageAsync : unit -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function PeekMessageAsync () As Task(Of CloudQueueMessage)

Returns

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

Attributes

Applies to

PeekMessageAsync(CancellationToken)

Initiates an asynchronous operation to get a single message from the queue.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> PeekMessageAsync (System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member PeekMessageAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.PeekMessageAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function PeekMessageAsync (cancellationToken As CancellationToken) As Task(Of CloudQueueMessage)

Parameters

cancellationToken
CancellationToken

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

Returns

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

Attributes

Applies to

PeekMessageAsync(QueueRequestOptions, OperationContext)

Initiates an asynchronous operation to get a single message from the queue.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> PeekMessageAsync (Microsoft.Azure.Storage.Queue.QueueRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member PeekMessageAsync : Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.PeekMessageAsync : Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function PeekMessageAsync (options As QueueRequestOptions, operationContext As OperationContext) As Task(Of CloudQueueMessage)

Parameters

options
QueueRequestOptions

A QueueRequestOptions 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 CloudQueueMessage that represents the asynchronous operation.

Attributes

Applies to

PeekMessageAsync(QueueRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get a single message from the queue.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> PeekMessageAsync (Microsoft.Azure.Storage.Queue.QueueRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member PeekMessageAsync : Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.PeekMessageAsync : Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function PeekMessageAsync (options As QueueRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of CloudQueueMessage)

Parameters

options
QueueRequestOptions

A QueueRequestOptions 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 CloudQueueMessage that represents the asynchronous operation.

Attributes

Applies to