Click or drag to resize

MongoCursorCreate Method (Type, MongoCollection, IMongoQuery, ReadPreference, IBsonSerializer)

Note: This API is now obsolete.

Creates a cursor.

Namespace:  MongoDB.Driver
Assembly:  MongoDB.Driver.Legacy (in MongoDB.Driver.Legacy.dll) Version: 2.13.1-v2-13-x1+a7f8afe27855f38f4f72157d11ba2ae73895502e
Syntax
[ObsoleteAttribute("Use a method that returns a cursor instead.")]
public static MongoCursor Create(
	Type documentType,
	MongoCollection collection,
	IMongoQuery query,
	ReadPreference readPreference,
	IBsonSerializer serializer
)

Parameters

documentType
Type: SystemType
The type of the returned documents.
collection
Type: MongoDB.DriverMongoCollection
The collection to query.
query
Type: MongoDB.DriverIMongoQuery
A query.
readPreference
Type: MongoDB.DriverReadPreference
The read preference.
serializer
Type: MongoDB.Bson.SerializationIBsonSerializer
The serializer.

Return Value

Type: MongoCursor
A cursor.
See Also