Condividi tramite


Receiver<T>.ReceiveAsync Method

Definition

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

Task<T>

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

Task<T>

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

Task<T>

The receive message or null if there was no message until the specified timeout.

Attributes

Applies to