예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GridFSBucketOptions"/> class.
 /// </summary>
 /// <param name="other">The other <see cref="GridFSBucketOptions.Immutable"/> from which to copy the values.</param>
 public GridFSBucketOptions(GridFSBucketOptions.Immutable other)
 {
     _bucketName     = other.BucketName;
     _chunkSizeBytes = other.ChunkSizeBytes;
     _readPreference = other.ReadPreference;
     _writeConcern   = other.WriteConcern;
 }
예제 #2
0
        // constructors
        /// <inheritdoc />
        public GridFSBucket(IMongoDatabase database, GridFSBucketOptions.Immutable options = null)
        {
            _database = Ensure.IsNotNull(database, "database");
            _options = options ?? GridFSBucketOptions.Immutable.Defaults;

            _cluster = database.Client.Cluster;
            _ensuredIndexes = 0;
        }
예제 #3
0
        // constructors
        /// <inheritdoc />
        public GridFSBucket(IMongoDatabase database, GridFSBucketOptions.Immutable options = null)
        {
            _database = Ensure.IsNotNull(database, "database");
            _options  = options ?? GridFSBucketOptions.Immutable.Defaults;

            _cluster        = database.Client.Cluster;
            _ensuredIndexes = 0;
        }