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
cursorIAsyncCursor<TDocument>The cursor.
Returns
- IAsyncEnumerable<TDocument>
An IAsyncEnumerable.
Type Parameters
TDocumentThe type of the document.