Method AsObjectsAsync
AsObjectsAsync<T>(IAsyncEnumerable<IRecord>, CancellationToken)
Converts the IAsyncEnumerable<T> to an IAsyncEnumerable<T> of objects of
type T
, by mapping each record in the enumerable to an object. If no custom mapper is defined
for type T
, the default mapper will be used.
public static IAsyncEnumerable<T> AsObjectsAsync<T>(this IAsyncEnumerable<IRecord> asyncEnumerable, CancellationToken cancellationToken = default)
Parameters
asyncEnumerable
IAsyncEnumerable<IRecord>The asynchronous source of records.
cancellationToken
CancellationTokenA token to cancel the operation.
Returns
- IAsyncEnumerable<T>
An IAsyncEnumerable of the mapped objects.
Type Parameters
T
The type of object to map to.