Click or drag to resize

IAsyncCursorSource<TDocument> Interface

Represents an operation that will return a cursor when executed.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public interface IAsyncCursorSource<TDocument>

Type Parameters

TDocument
The type of the document.

The IAsyncCursorSource<TDocument> type exposes the following members.

Methods
  NameDescription
Public methodToCursor
Executes the operation and returns a cursor to the results.
Public methodToCursorAsync
Executes the operation and returns a cursor to the results.
Top
Extension Methods
  NameDescription
Public Extension MethodAny<TDocument>
Determines whether the cursor returned by a cursor source contains any documents.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodAnyAsync<TDocument>
Determines whether the cursor returned by a cursor source contains any documents.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodFirst<TDocument>
Returns the first document of a cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodFirstAsync<TDocument>
Returns the first document of a cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodFirstOrDefault<TDocument>
Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodFirstOrDefaultAsync<TDocument>
Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodForEachAsync<TDocument>(Func<TDocument, Task>, CancellationToken)Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodForEachAsync<TDocument>(Func<TDocument, Int32, Task>, CancellationToken)Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodForEachAsync<TDocument>(Action<TDocument>, CancellationToken)Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodForEachAsync<TDocument>(Action<TDocument, Int32>, CancellationToken)Overloaded.
Calls a delegate for each document returned by the cursor.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodSingle<TDocument>
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.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodSingleAsync<TDocument>
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.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodSingleOrDefault<TDocument>
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.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodSingleOrDefaultAsync<TDocument>
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.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodToEnumerable<TDocument>
Wraps a cursor source in an IEnumerable. Each time GetEnumerator is called a new cursor is fetched from the cursor source.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodToList<TDocument>
Returns a list containing all the documents returned by the cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.)
Public Extension MethodToListAsync<TDocument>
Returns a list containing all the documents returned by the cursor returned by a cursor source.
(Defined by IAsyncCursorSourceExtensions.)
Top
See Also