Method ToAsyncEnumerable
ToAsyncEnumerable<TDocument>(IAsyncCursor<TDocument>)
Wraps a cursor in an IAsyncEnumerable that can be enumerated one time.
public static IAsyncEnumerable<TDocument> ToAsyncEnumerable<TDocument>(this IAsyncCursor<TDocument> cursor)
Parameters
cursor
IAsyncCursor<TDocument>The cursor.
Returns
- IAsyncEnumerable<TDocument>
An IAsyncEnumerable.
Type Parameters
TDocument
The type of the document.