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