public static MongoCursor <TDocument> zFindAll <TDocument>(this MongoCollection collection, SortByWrapper sort = null, FieldsWrapper fields = null, int limit = 0, BsonDocument options = null) { MongoLog.CurrentMongoLog.LogFindAllAs(collection, sort, fields, limit, options); return(MongoLog.CurrentMongoLog.ExecuteAndLogResult( () => { MongoCursor <TDocument> cursor = collection.FindAllAs <TDocument>(); if (sort != null) { cursor.SetSortOrder(sort); } if (fields != null) { cursor.SetFields(fields); } if (limit != 0) { cursor.SetLimit(limit); } if (options != null) { cursor.SetOptions(options); } return cursor; })); }
public IMongoCursor SetOptions(BsonDocument options) { return(new MongoCursorProxy(_mongoMongoCursor.SetOptions(options))); }