Muokkaa

Jaa


DataflowBlock.ReceiveAllAsync<TOutput> Method

Definition

Creates an IAsyncEnumerable<T> that enables receiving all of the data from the source.

public static System.Collections.Generic.IAsyncEnumerable<TOutput> ReceiveAllAsync<TOutput> (this System.Threading.Tasks.Dataflow.IReceivableSourceBlock<TOutput> source, System.Threading.CancellationToken cancellationToken = default);
static member ReceiveAllAsync : System.Threading.Tasks.Dataflow.IReceivableSourceBlock<'Output> * System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'Output>
<Extension()>
Public Function ReceiveAllAsync(Of TOutput) (source As IReceivableSourceBlock(Of TOutput), Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of TOutput)

Type Parameters

TOutput

Specifies the type of data contained in the source.

Parameters

source
IReceivableSourceBlock<TOutput>

The source from which to asynchronously receive.

cancellationToken
CancellationToken

The CancellationToken that can be used to cancel the receive operation.

Returns

IAsyncEnumerable<TOutput>

The created async enumerable.

Exceptions

The source is null.

The cancellation token was canceled. This exception is stored into the returned task.

Applies to