/// <inheritdoc /> public virtual IMongoCollection <TDocument> WithReadConcern(ReadConcern readConcern) { throw new NotImplementedException(); }
/// <inheritdoc /> public virtual IMongoDatabase WithReadConcern(ReadConcern readConcern) { throw new NotImplementedException(); }
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 })); }
/// <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; }
public override IMongoCollection <TDerivedDocument> WithReadConcern(ReadConcern readConcern) { return(new OfTypeMongoCollection <TRootDocument, TDerivedDocument>(_rootDocumentCollection, WrappedCollection.WithReadConcern(readConcern), Filter)); }