IAsyncCursorExtensions Class |
Namespace: MongoDB.Driver
The IAsyncCursorExtensions type exposes the following members.
Name | Description | |
---|---|---|
Any<TDocument> |
Determines whether the cursor contains any documents.
| |
AnyAsync<TDocument> |
Determines whether the cursor contains any documents.
| |
First<TDocument> |
Returns the first document of a cursor.
| |
FirstAsync<TDocument> |
Returns the first document of a cursor.
| |
FirstOrDefault<TDocument> |
Returns the first document of a cursor, or a default value if the cursor contains no documents.
| |
FirstOrDefaultAsync<TDocument> |
Returns the first document of the cursor, or a default value if the cursor contains no documents.
| |
ForEachAsync<TDocument>(IAsyncCursor<TDocument>, Action<TDocument>, CancellationToken) |
Calls a delegate for each document returned by the cursor.
| |
ForEachAsync<TDocument>(IAsyncCursor<TDocument>, Action<TDocument, Int32>, CancellationToken) |
Calls a delegate for each document returned by the cursor.
| |
ForEachAsync<TDocument>(IAsyncCursor<TDocument>, Func<TDocument, Task>, CancellationToken) |
Calls a delegate for each document returned by the cursor.
| |
ForEachAsync<TDocument>(IAsyncCursor<TDocument>, Func<TDocument, Int32, Task>, CancellationToken) |
Calls a delegate for each document returned by the cursor.
| |
Single<TDocument> |
Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document.
| |
SingleAsync<TDocument> |
Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document.
| |
SingleOrDefault<TDocument> |
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.
| |
SingleOrDefaultAsync<TDocument> |
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.
| |
ToEnumerable<TDocument> |
Wraps a cursor in an IEnumerable that can be enumerated one time.
| |
ToList<TDocument> |
Returns a list containing all the documents returned by a cursor.
| |
ToListAsync<TDocument> |
Returns a list containing all the documents returned by a cursor.
|