Class IAsyncCursorExtensions

| MongoDB CSharp Driver API Reference (original) (raw)

Namespace

MongoDB.Driver

Assembly

MongoDB.Driver.dll

Represents extension methods for IAsyncCursor.

public static class IAsyncCursorExtensions

Inheritance

IAsyncCursorExtensions

Inherited Members

Methods

AnyAsync(IAsyncCursor, CancellationToken)

Determines whether the cursor contains any documents.

Any(IAsyncCursor, CancellationToken)

Determines whether the cursor contains any documents.

FirstAsync(IAsyncCursor, CancellationToken)

Returns the first document of a cursor.

FirstOrDefaultAsync(IAsyncCursor, CancellationToken)

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

FirstOrDefault(IAsyncCursor, CancellationToken)

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

First(IAsyncCursor, CancellationToken)

Returns the first document of a cursor.

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

Calls a delegate for each document returned by the cursor.

ForEachAsync(IAsyncCursor, Action, CancellationToken)

Calls a delegate for each document returned by the cursor.

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

Calls a delegate for each document returned by the cursor.

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

Calls a delegate for each document returned by the cursor.

SingleAsync(IAsyncCursor, CancellationToken)

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

SingleOrDefaultAsync(IAsyncCursor, CancellationToken)

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

SingleOrDefault(IAsyncCursor, CancellationToken)

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

Single(IAsyncCursor, CancellationToken)

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

ToEnumerable(IAsyncCursor, CancellationToken)

Wraps a cursor in an IEnumerable that can be enumerated one time.

ToListAsync(IAsyncCursor, CancellationToken)

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

ToList(IAsyncCursor, CancellationToken)

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