Method ToEnumerable
ToEnumerable<TDocument>(IAsyncCursor<TDocument>, CancellationToken)
Wraps a cursor in an IEnumerable that can be enumerated one time.
public static IEnumerable<TDocument> ToEnumerable<TDocument>(this IAsyncCursor<TDocument> cursor, CancellationToken cancellationToken = default)
Parameters
cursor
IAsyncCursor<TDocument>The cursor.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- IEnumerable<TDocument>
An IEnumerable
Type Parameters
TDocument
The type of the document.