Method ToEnumerable
ToEnumerable<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)
Wraps a cursor source in an IEnumerable. Each time GetEnumerator is called a new cursor is fetched from the cursor source.
public static IEnumerable<TDocument> ToEnumerable<TDocument>(this IAsyncCursorSource<TDocument> source, CancellationToken cancellationToken = default)Parameters
- sourceIAsyncCursorSource<TDocument>
- The source. 
- cancellationTokenCancellationToken
- The cancellation token. 
Returns
- IEnumerable<TDocument>
- An IEnumerable. 
Type Parameters
- TDocument
- The type of the document.