Receiver<T>.ReceiveAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
ReceiveAsync() |
Obsolete.
Receive a message using the default timeout. |
ReceiveAsync(CancellationToken) |
Receives a message. |
ReceiveAsync(TimeSpan) |
Obsolete.
Receives a message. |
ReceiveAsync()
Caution
Use ReceiveAsync(CancellationToken cancellationToken).
Receive a message using the default timeout.
[System.Obsolete("Use ReceiveAsync(CancellationToken cancellationToken).")]
public abstract System.Threading.Tasks.Task<T> ReceiveAsync ();
[<System.Obsolete("Use ReceiveAsync(CancellationToken cancellationToken).")>]
abstract member ReceiveAsync : unit -> System.Threading.Tasks.Task<'T>
Public MustOverride Function ReceiveAsync () As Task(Of T)
Returns
The receive message or null if there was no message until the default timeout.
- Attributes
Applies to
ReceiveAsync(CancellationToken)
Receives a message.
public abstract System.Threading.Tasks.Task<T> ReceiveAsync (System.Threading.CancellationToken cancellationToken);
abstract member ReceiveAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Public MustOverride Function ReceiveAsync (cancellationToken As CancellationToken) As Task(Of T)
Parameters
- cancellationToken
- CancellationToken
The Cancellation token.
Returns
The receive message or null if there was no message until the specified timeout.
Applies to
ReceiveAsync(TimeSpan)
Caution
Use ReceiveAsync(CancellationToken cancellationToken).
Receives a message.
[System.Obsolete("Use ReceiveAsync(CancellationToken cancellationToken).")]
public abstract System.Threading.Tasks.Task<T> ReceiveAsync (TimeSpan timeout);
[<System.Obsolete("Use ReceiveAsync(CancellationToken cancellationToken).")>]
abstract member ReceiveAsync : TimeSpan -> System.Threading.Tasks.Task<'T>
Public MustOverride Function ReceiveAsync (timeout As TimeSpan) As Task(Of T)
Parameters
- timeout
- TimeSpan
The timeout for receiving a message.
Returns
The receive message or null if there was no message until the specified timeout.
- Attributes
Applies to
Azure SDK for .NET