/// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 /// <param name="collection">The collection from which to get default settings for the options.</param>
 public MongoInsertOptions(
     MongoCollection collection
 ) {
     this.checkElementNames = true;
     this.flags = InsertFlags.None;
     this.safeMode = collection.Settings.SafeMode;
 }
Ejemplo n.º 2
0
 // constructors
 internal MongoInsertMessage(BsonBinaryWriterSettings writerSettings, string collectionFullName, bool checkElementNames, InsertFlags flags)
     : base(MessageOpcode.Insert, null, writerSettings)
 {
     this.collectionFullName = collectionFullName;
     this.checkElementNames  = checkElementNames;
     this.flags = flags;
 }
 // constructors
 internal MongoInsertMessage(BsonBinaryWriterSettings writerSettings, string collectionFullName, bool checkElementNames, InsertFlags flags)
     : base(MessageOpcode.Insert, null, writerSettings)
 {
     this.collectionFullName = collectionFullName;
     this.checkElementNames = checkElementNames;
     this.flags = flags;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 /// <param name="collection">The collection from which to get default settings for the options.</param>
 public MongoInsertOptions(
     MongoCollection collection
     )
 {
     this.checkElementNames = true;
     this.flags             = InsertFlags.None;
     this.safeMode          = collection.Settings.SafeMode;
 }
Ejemplo n.º 5
0
 // constructors
 internal MongoInsertMessage(
     BsonBinaryWriterSettings writerSettings,
     string collectionFullName,
     bool checkElementNames,
     InsertFlags flags,
     int maxBatchCount,
     int maxBatchLength,
     int maxDocumentSize,
     Batch <InsertRequest> batch)
     : base(MessageOpcode.Insert, writerSettings)
 {
     _collectionFullName = collectionFullName;
     _checkElementNames  = checkElementNames;
     _flags           = flags;
     _maxBatchCount   = maxBatchCount;
     _maxBatchLength  = maxBatchLength;
     _maxDocumentSize = maxDocumentSize;
     _batch           = batch;
 }
 public InsertOperation(
     string databaseName,
     string collectionName,
     BsonBinaryReaderSettings readerSettings,
     BsonBinaryWriterSettings writerSettings,
     WriteConcern writeConcern,
     bool assignIdOnInsert,
     bool checkElementNames,
     Type documentType,
     IEnumerable documents,
     InsertFlags flags)
     : base(databaseName, collectionName, readerSettings, writerSettings, writeConcern)
 {
     _assignIdOnInsert = assignIdOnInsert;
     _checkElementNames = checkElementNames;
     _documentType = documentType;
     _documents = documents;
     _flags = flags;
 }
 public InsertOperation(
     string databaseName,
     string collectionName,
     BsonBinaryReaderSettings readerSettings,
     BsonBinaryWriterSettings writerSettings,
     WriteConcern writeConcern,
     bool assignIdOnInsert,
     bool checkElementNames,
     Type documentType,
     IEnumerable documents,
     InsertFlags flags)
     : base(databaseName, collectionName, readerSettings, writerSettings, writeConcern)
 {
     _assignIdOnInsert = assignIdOnInsert;
     _checkElementNames = checkElementNames;
     _documentType = documentType;
     _documents = documents;
     _flags = flags;
 }
 // constructors
 internal MongoInsertMessage(
     BsonBinaryWriterSettings writerSettings,
     string collectionFullName,
     bool checkElementNames,
     InsertFlags flags,
     int maxBatchCount,
     int maxBatchLength,
     int maxDocumentSize,
     Batch<InsertRequest> batch)
     : base(MessageOpcode.Insert, writerSettings)
 {
     _collectionFullName = collectionFullName;
     _checkElementNames = checkElementNames;
     _flags = flags;
     _maxBatchCount = maxBatchCount;
     _maxBatchLength = maxBatchLength;
     _maxDocumentSize = maxDocumentSize;
     _batch = batch;
 }
 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 public MongoInsertOptions()
 {
     _checkElementNames = true;
     _flags = InsertFlags.None;
 }
Ejemplo n.º 10
0
 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 public MongoInsertOptions()
 {
     _flags = InsertFlags.None;
 }
Ejemplo n.º 11
0
 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 public MongoInsertOptions()
 {
     _checkElementNames = true;
     _flags             = InsertFlags.None;
 }
 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 public MongoInsertOptions()
 {
     this.checkElementNames = true;
     this.flags = InsertFlags.None;
 }
 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 public MongoInsertOptions()
 {
     _flags = InsertFlags.None;
 }
Ejemplo n.º 14
0
 // constructors
 /// <summary>
 /// Initializes a new instance of the MongoInsertOptions class.
 /// </summary>
 public MongoInsertOptions()
 {
     this.checkElementNames = true;
     this.flags             = InsertFlags.None;
 }