Reader<T>.Read All Async(CancellationToken) Method
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 reading all of the data from the channel.
public virtual System.Collections.Generic.IAsyncEnumerable<T> ReadAllAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member ReadAllAsync : System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'T> override this.ReadAllAsync : System.Threading.CancellationToken -> System.Collections.Generic.IAsyncEnumerable<'T>
Public Overridable Function ReadAllAsync (Optional cancellationToken As CancellationToken = Nothing) As IAsyncEnumerable(Of T)
The cancellation token to use to cancel the enumeration. If data is immediately ready for reading, then that data may be yielded even after cancellation has been requested.
The created async enumerable.
The cancellation token was canceled. This exception is stored into the returned task.
Each MoveNextAsync() call that returns
true will read the next item out of the channel.
false once no more data is or will ever be available to read.