DataflowBlock.ReceiveAllAsync<TOutput> Method
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.
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)
- TOutput
Specifies the type of data contained in the source.
The source from which to asynchronously receive.
- cancellationToken
- CancellationToken
The CancellationToken that can be used to cancel the receive operation.
The created async enumerable.
The source
is null
.
The cancellation token was canceled. This exception is stored into the returned task.
Product | Versions |
---|---|
.NET | 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10 |
.NET Standard | 2.1 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: