AsyncCursor(TDocument) Class (original) (raw)

AsyncCursorTDocument Class

Represents an async cursor.

Inheritance Hierarchy

SystemObject
MongoDB.Driver.Core.OperationsAsyncCursorTDocument

Namespace: MongoDB.Driver.Core.Operations
Assembly: MongoDB.Driver.Core (in MongoDB.Driver.Core.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed

Syntax

public class AsyncCursor : IAsyncCursor, IDisposable

Public Class AsyncCursor(Of TDocument) Implements IAsyncCursor(Of TDocument), IDisposable

type AsyncCursor<'TDocument> =
class interface IAsyncCursor<'TDocument> interface IDisposable end

Type Parameters

TDocument

The type of the documents.

The AsyncCursorTDocument type exposes the following members.

Constructors

| | Name | Description | | | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------- | | Public method | AsyncCursorTDocument(IChannelSource, CollectionNamespace, BsonDocument, IReadOnlyListTDocument, Int64, NullableInt32, NullableInt32, IBsonSerializerTDocument, MessageEncoderSettings, NullableTimeSpan) | Initializes a new instance of the AsyncCursorTDocument class. | | Public method | AsyncCursorTDocument(IChannelSource, CollectionNamespace, BsonDocument, IReadOnlyListTDocument, Int64, BsonDocument, NullableInt32, NullableInt32, IBsonSerializerTDocument, MessageEncoderSettings, NullableTimeSpan) | Initializes a new instance of the AsyncCursorTDocument class. |

Top

Properties

Methods

| | Name | Description | | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Public method | Close | Closes the cursor. | | Public method | CloseAsync | Closes the cursor. | | Public method | Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | | Protected method | Dispose(Boolean) | Releases unmanaged and - optionally - managed resources. | | Public method | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | | Protected method | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | | Public method | GetHashCode | Serves as the default hash function. (Inherited from Object.) | | Public method | GetType | Gets the Type of the current instance. (Inherited from Object.) | | Protected method | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | | Public method | MoveNext | Moves to the next batch of documents. | | Public method | MoveNextAsync | Moves to the next batch of documents. | | Public method | ToString | Returns a string that represents the current object. (Inherited from Object.) |

Top

Extension Methods

| | Name | Description | | | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Public Extension Method | AnyTDocument | Determines whether the cursor contains any documents. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | AnyAsyncTDocument | Determines whether the cursor contains any documents. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | FirstTDocument | Returns the first document of a cursor. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | FirstAsyncTDocument | Returns the first document of a cursor. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | FirstOrDefaultTDocument | Returns the first document of a cursor, or a default value if the cursor contains no documents. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | FirstOrDefaultAsyncTDocument | Returns the first document of the cursor, or a default value if the cursor contains no documents. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | ForEachAsyncTDocument(FuncTDocument, Task, CancellationToken) | Overloaded. Calls a delegate for each document returned by the cursor. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | ForEachAsyncTDocument(FuncTDocument, Int32, Task, CancellationToken) | Overloaded. Calls a delegate for each document returned by the cursor. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | ForEachAsyncTDocument(ActionTDocument, CancellationToken) | Overloaded. Calls a delegate for each document returned by the cursor. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | ForEachAsyncTDocument(ActionTDocument, Int32, CancellationToken) | Overloaded. Calls a delegate for each document returned by the cursor. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | SingleTDocument | Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | SingleAsyncTDocument | Returns the only document of a cursor. This method throws an exception if the cursor does not contain exactly one document. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | SingleOrDefaultTDocument | 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. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | SingleOrDefaultAsyncTDocument | 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. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | ToBson | Serializes an object to a BSON byte array. (Defined by BsonExtensionMethods.) | | Public Extension Method | ToBsonDocument | Serializes an object to a BsonDocument. (Defined by BsonExtensionMethods.) | | Public Extension Method | ToEnumerableTDocument | Wraps a cursor in an IEnumerable that can be enumerated one time. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | ToJson | Serializes an object to a JSON string. (Defined by BsonExtensionMethods.) | | Public Extension Method | ToListTDocument | Returns a list containing all the documents returned by a cursor. (Defined by IAsyncCursorExtensions.) | | Public Extension Method | ToListAsyncTDocument | Returns a list containing all the documents returned by a cursor. (Defined by IAsyncCursorExtensions.) |

Top

See Also

Reference