Click or drag to resize

MongoCursorTDocument Class

An object that can be enumerated to fetch the results of a query. The query is not sent to the server until you begin enumerating the results.
Inheritance Hierarchy
SystemObject
  MongoDB.DriverMongoCursor
    MongoDB.DriverMongoCursorTDocument

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.11.0+cb27a82ea70620ad1acad8058809be8302ae4f2a
Syntax
public class MongoCursor<TDocument> : MongoCursor, 
	IEnumerable<TDocument>, IEnumerable

Type Parameters

TDocument
The type of the documents returned.

The MongoCursorTDocument type exposes the following members.

Constructors
  NameDescription
Public methodMongoCursorTDocument(MongoCollection, IMongoQuery, ReadPreference, IBsonSerializer) Obsolete.
Creates a new MongoCursor. It is very unlikely that you will call this constructor. Instead, see all the Find methods in MongoCollection.
Public methodMongoCursorTDocument(MongoCollection, IMongoQuery, ReadConcern, ReadPreference, IBsonSerializer) Obsolete.
Initializes a new instance of the MongoCursorTDocument class.
Top
Properties
  NameDescription
Public propertyBatchSize
Gets or sets the batch size (the number of documents returned per batch).
(Inherited from MongoCursor.)
Public propertyCollation
Gets the collation.
(Inherited from MongoCursor.)
Public propertyCollection
Gets the collection that is being queried.
(Inherited from MongoCursor.)
Public propertyDatabase
Gets the database that constains the collection that is being queried.
(Inherited from MongoCursor.)
Public propertyFields
Gets or sets the fields that will be returned from the server.
(Inherited from MongoCursor.)
Public propertyFlags
Gets or sets the query flags.
(Inherited from MongoCursor.)
Public propertyIsFrozen
Gets whether the cursor has been frozen to prevent further changes.
(Inherited from MongoCursor.)
Public propertyLimit
Gets or sets the limit on the number of documents to be returned.
(Inherited from MongoCursor.)
Public propertyMaxAwaitTime
Gets or sets the maximum await time for TailableAwait cursors.
(Inherited from MongoCursor.)
Public propertyOptions
Gets or sets the cursor options. See also the individual Set{Option} methods, which are easier to use.
(Inherited from MongoCursor.)
Public propertyQuery
Gets the query that will be sent to the server.
(Inherited from MongoCursor.)
Public propertyReadConcern
Gets the read concern.
(Inherited from MongoCursor.)
Public propertyReadPreference
Gets or sets the read preference.
(Inherited from MongoCursor.)
Public propertySerializer
Gets the serializer.
Public propertyServer
Gets the server that the query will be sent to.
(Inherited from MongoCursor.)
Public propertySkip
Gets or sets the number of documents the server should skip before returning the rest of the documents.
(Inherited from MongoCursor.)
Top
Methods
  NameDescription
Public methodClone(Type)
Creates a clone of the cursor.
(Inherited from MongoCursor.)
Public methodClone(Type, IBsonSerializer)
Creates a clone of the cursor.
(Inherited from MongoCursor.)
Public methodCloneTDocument
Creates a clone of the cursor.
(Inherited from MongoCursor.)
Public methodCloneTDocument(IBsonSerializer)
Creates a clone of the cursor.
(Inherited from MongoCursor.)
Public methodCount
Returns the number of documents that match the query (ignores Skip and Limit, unlike Size which honors them).
(Inherited from MongoCursor.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExplain
Returns an explanation of how the query was executed (instead of the results).
(Inherited from MongoCursor.)
Public methodExplain(Boolean)
Returns an explanation of how the query was executed (instead of the results).
(Inherited from MongoCursor.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that can be used to enumerate the cursor. Normally you will use the foreach statement to enumerate the cursor (foreach will call GetEnumerator for you).
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodIEnumerableGetEnumerator
Gets the non-generic enumerator.
(Overrides MongoCursorIEnumerableGetEnumerator.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodSetBatchSize
Sets the batch size (the number of documents returned per batch).
Public methodSetCollation
Sets the collation.
Public methodSetFields(String)
Sets the fields that will be returned from the server.
Public methodSetFields(IMongoFields)
Sets the fields that will be returned from the server.
Public methodSetFlags
Sets the query flags.
Public methodSetHint(String)
Sets the index hint for the query.
Public methodSetHint(BsonDocument)
Sets the index hint for the query.
Public methodSetLimit
Sets the limit on the number of documents to be returned.
Public methodSetMax
Sets the max value for the index key range of documents to return (note: the max value itself is excluded from the range). Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically).
Public methodSetMaxAwaitTime
Sets the maximum await time for tailable await cursors.
Public methodSetMaxScan Obsolete.
Sets the maximum number of documents to scan.
Public methodSetMaxTime
Sets the maximum time the server should spend on this query.
Public methodSetMin
Sets the min value for the index key range of documents to return (note: the min value itself is included in the range). Often combined with SetHint (if SetHint is not used the server will attempt to determine the matching index automatically).
Public methodSetOption
Sets a cursor option.
Public methodSetOptions
Sets multiple cursor options. See also the individual Set{Option} methods, which are easier to use.
Public methodSetReadPreference
Sets the read preference.
Public methodSetSerializer(IBsonSerializer)
Sets the serializer.
(Inherited from MongoCursor.)
Public methodSetSerializer(IBsonSerializerTDocument)
Sets the serializer.
Public methodSetShowDiskLoc
Sets the $showDiskLoc option.
Public methodSetSkip
Sets the number of documents the server should skip before returning the rest of the documents.
Public methodSetSnapshot Obsolete.
Sets the $snapshot option.
Public methodSetSortOrder(String)
Sets the sort order for the server to sort the documents by before returning them.
Public methodSetSortOrder(IMongoSortBy)
Sets the sort order for the server to sort the documents by before returning them.
Public methodSize
Returns the size of the result set (honors Skip and Limit, unlike Count which does not).
(Inherited from MongoCursor.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods
  NameDescription
Public Extension MethodContainsAllTDocument
Determines whether a sequence contains all of the specified values.
(Defined by LinqToMongo.)
Public Extension MethodContainsAnyTDocument
Determines whether a sequence contains any of the specified values.
(Defined by LinqToMongo.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, Int32)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, NullableInt32)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, Int64)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, NullableInt64)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, Single)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, NullableSingle)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, Double)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, NullableDouble)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, Decimal)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationPopulationTDocument(FuncTDocument, NullableDecimal)Overloaded.
Computes the population standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, Int32)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, NullableInt32)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, Int64)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, NullableInt64)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, Single)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, NullableSingle)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, Double)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, NullableDouble)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, Decimal)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodStandardDeviationSampleTDocument(FuncTDocument, NullableDecimal)Overloaded.
Computes the sample standard deviation of a sequence of values that are obtained by invoking a transform function on each element of the input sequence.
(Defined by MongoEnumerable.)
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also