Struct ReaderAsyncEnumerator
Returned by ToAsyncEnumerable(NpgsqlDataReader) making
it possible to asynchronously enumerate the reader rows via the C# await foreach
statement or the equivalent for other .NET languages.
Namespace: Neon.Postgres
Assembly: Neon.Postgres.dll
Syntax
public struct ReaderAsyncEnumerator
Methods
GetAsyncEnumerator(CancellationToken)
Returns an enumerator that iterates asynchronously through the collection.
Declaration
public IAsyncEnumerator<NpgsqlDataReader> GetAsyncEnumerator(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
CancellationToken | cancellationToken | A CancellationToken that may be used to cancel the asynchronous iteration. |
Returns
Type | Description |
---|---|
IAsyncEnumerator<NpgsqlDataReader> | An enumerator that can be used to iterate asynchronously through the collection. |