コード例 #1
0
ファイル: MongoLog.cs プロジェクト: 24/source_04
 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;
     }));
 }
コード例 #2
0
 public IMongoCursor SetOptions(BsonDocument options)
 {
     return(new MongoCursorProxy(_mongoMongoCursor.SetOptions(options)));
 }