Esempio n. 1
0
 /// <inheritdoc />
 public virtual IMongoCollection <TDocument> WithReadConcern(ReadConcern readConcern)
 {
     throw new NotImplementedException();
 }
 /// <inheritdoc />
 public virtual IMongoDatabase WithReadConcern(ReadConcern readConcern)
 {
     throw new NotImplementedException();
 }
Esempio n. 3
0
        public static MongoCursor Create(Type documentType, MongoCollection collection, IMongoQuery query, ReadConcern readConcern, ReadPreference readPreference, IBsonSerializer serializer)
        {
            var cursorDefinition = typeof(MongoCursor <>);
            var cursorType       = cursorDefinition.MakeGenericType(documentType);
            var constructorInfo  = cursorType.GetTypeInfo().GetConstructor(new Type[] { typeof(MongoCollection), typeof(IMongoQuery), typeof(ReadConcern), typeof(ReadPreference), typeof(IBsonSerializer) });

            return((MongoCursor)constructorInfo.Invoke(new object[] { collection, query, readConcern, readPreference, serializer }));
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MongoCursor"/> class.
 /// </summary>
 /// <param name="collection">The collection.</param>
 /// <param name="query">The query.</param>
 /// <param name="readConcern">The read concern.</param>
 /// <param name="readPreference">The read preference.</param>
 /// <param name="serializer">The serializer.</param>
 protected MongoCursor(MongoCollection collection, IMongoQuery query, ReadConcern readConcern, ReadPreference readPreference, IBsonSerializer serializer)
     : this(collection, query, readPreference, serializer)
 {
     _readConcern = readConcern;
 }
Esempio n. 5
0
 public override IMongoCollection <TDerivedDocument> WithReadConcern(ReadConcern readConcern)
 {
     return(new OfTypeMongoCollection <TRootDocument, TDerivedDocument>(_rootDocumentCollection, WrappedCollection.WithReadConcern(readConcern), Filter));
 }