Click or drag to resize
IAsyncCursorExtensions Class
Represents extension methods for IAsyncCursor.
Inheritance Hierarchy
SystemObject
  MongoDB.DriverIAsyncCursorExtensions

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

The IAsyncCursorExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAnyTDocument
Determines whether the cursor contains any documents.
Public methodStatic memberAnyAsyncTDocument
Determines whether the cursor contains any documents.
Public methodStatic memberFirstTDocument
Returns the first document of a cursor.
Public methodStatic memberFirstAsyncTDocument
Returns the first document of a cursor.
Public methodStatic memberFirstOrDefaultTDocument
Returns the first document of a cursor, or a default value if the cursor contains no documents.
Public methodStatic memberFirstOrDefaultAsyncTDocument
Returns the first document of the cursor, or a default value if the cursor contains no documents.
Public methodStatic memberForEachAsyncTDocument(IAsyncCursorTDocument, ActionTDocument, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsyncTDocument(IAsyncCursorTDocument, ActionTDocument, Int32, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsyncTDocument(IAsyncCursorTDocument, FuncTDocument, Task, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsyncTDocument(IAsyncCursorTDocument, FuncTDocument, Int32, Task, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberSingleTDocument
Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document.
Public methodStatic memberSingleAsyncTDocument
Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document.
Public methodStatic memberSingleOrDefaultTDocument
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 memberSingleOrDefaultAsyncTDocument
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 memberToEnumerableTDocument
Wraps a cursor in an IEnumerable that can be enumerated one time.
Public methodStatic memberToListTDocument
Returns a list containing all the documents returned by a cursor.
Public methodStatic memberToListAsyncTDocument
Returns a list containing all the documents returned by a cursor.
Top
See Also