Table of Contents

Class IAsyncCursorSourceExtensions

Namespace
MongoDB.Driver
Assembly
MongoDB.Driver.dll

Represents extension methods for IAsyncCursorSource.

public static class IAsyncCursorSourceExtensions
Inheritance
IAsyncCursorSourceExtensions
Inherited Members

Methods

AnyAsync<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Determines whether the cursor returned by a cursor source contains any documents.

Any<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Determines whether the cursor returned by a cursor source contains any documents.

FirstAsync<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the first document of a cursor returned by a cursor source.

FirstOrDefaultAsync<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.

FirstOrDefault<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.

First<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the first document of a cursor returned by a cursor source.

ForEachAsync<TDocument>(IAsyncCursorSource<TDocument>, Action<TDocument, int>, CancellationToken)

Calls a delegate for each document returned by the cursor.

ForEachAsync<TDocument>(IAsyncCursorSource<TDocument>, Action<TDocument>, CancellationToken)

Calls a delegate for each document returned by the cursor.

ForEachAsync<TDocument>(IAsyncCursorSource<TDocument>, Func<TDocument, int, Task>, CancellationToken)

Calls a delegate for each document returned by the cursor.

ForEachAsync<TDocument>(IAsyncCursorSource<TDocument>, Func<TDocument, Task>, CancellationToken)

Calls a delegate for each document returned by the cursor.

SingleAsync<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the only document of a cursor returned by a cursor source. This method throws an exception if the cursor does not contain exactly one document.

SingleOrDefaultAsync<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the only document of a cursor returned by a cursor source, or a default value if the cursor contains no documents. This method throws an exception if the cursor contains more than one document.

SingleOrDefault<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the only document of a cursor returned by a cursor source, or a default value if the cursor contains no documents. This method throws an exception if the cursor contains more than one document.

Single<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns the only document of a cursor returned by a cursor source. This method throws an exception if the cursor does not contain exactly one document.

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.

ToListAsync<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns a list containing all the documents returned by the cursor returned by a cursor source.

ToList<TDocument>(IAsyncCursorSource<TDocument>, CancellationToken)

Returns a list containing all the documents returned by the cursor returned by a cursor source.