Click or drag to resize

IAsyncCursorExtensions Class

Represents extension methods for IAsyncCursor.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.IAsyncCursorExtensions

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
Syntax
public static class IAsyncCursorExtensions

The IAsyncCursorExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAny<TDocument>
Determines whether the cursor contains any documents.
Public methodStatic memberAnyAsync<TDocument>
Determines whether the cursor contains any documents.
Public methodStatic memberFirst<TDocument>
Returns the first document of a cursor.
Public methodStatic memberFirstAsync<TDocument>
Returns the first document of a cursor.
Public methodStatic memberFirstOrDefault<TDocument>
Returns the first document of a cursor, or a default value if the cursor contains no documents.
Public methodStatic memberFirstOrDefaultAsync<TDocument>
Returns the first document of the cursor, or a default value if the cursor contains no documents.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursor<TDocument>, Action<TDocument>, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursor<TDocument>, Action<TDocument, Int32>, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursor<TDocument>, Func<TDocument, Task>, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursor<TDocument>, Func<TDocument, Int32, Task>, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberSingle<TDocument>
Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document.
Public methodStatic memberSingleAsync<TDocument>
Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document.
Public methodStatic memberSingleOrDefault<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.
Public methodStatic memberSingleOrDefaultAsync<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.
Public methodStatic memberToEnumerable<TDocument>
Wraps a cursor in an IEnumerable that can be enumerated one time.
Public methodStatic memberToList<TDocument>
Returns a list containing all the documents returned by a cursor.
Public methodStatic memberToListAsync<TDocument>
Returns a list containing all the documents returned by a cursor.
Top
See Also