Click or drag to resize

IAsyncCursorSourceExtensions Class

Represents extension methods for IAsyncCursorSource.
Inheritance Hierarchy
System.Object
  MongoDB.Driver.IAsyncCursorSourceExtensions

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.21.0+5a9c3311e158910b88195f290e6d4b1b2715d2b2
Syntax
public static class IAsyncCursorSourceExtensions

The IAsyncCursorSourceExtensions type exposes the following members.

Methods
  NameDescription
Public methodStatic memberAny<TDocument>
Determines whether the cursor returned by a cursor source contains any documents.
Public methodStatic memberAnyAsync<TDocument>
Determines whether the cursor returned by a cursor source contains any documents.
Public methodStatic memberFirst<TDocument>
Returns the first document of a cursor returned by a cursor source.
Public methodStatic memberFirstAsync<TDocument>
Returns the first document of a cursor returned by a cursor source.
Public methodStatic memberFirstOrDefault<TDocument>
Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
Public methodStatic memberFirstOrDefaultAsync<TDocument>
Returns the first document of a cursor returned by a cursor source, or a default value if the cursor contains no documents.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursorSource<TDocument>, Action<TDocument>, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursorSource<TDocument>, Action<TDocument, Int32>, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursorSource<TDocument>, Func<TDocument, Task>, CancellationToken)
Calls a delegate for each document returned by the cursor.
Public methodStatic memberForEachAsync<TDocument>(IAsyncCursorSource<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 returned by a cursor source. 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 returned by a cursor source. 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 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.
Public methodStatic memberSingleOrDefaultAsync<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.
Public methodStatic memberToEnumerable<TDocument>
Wraps a cursor source in an IEnumerable. Each time GetEnumerator is called a new cursor is fetched from the cursor source.
Public methodStatic memberToList<TDocument>
Returns a list containing all the documents returned by the cursor returned by a cursor source.
Public methodStatic memberToListAsync<TDocument>
Returns a list containing all the documents returned by the cursor returned by a cursor source.
Top
See Also