/// <summary>
 /// Initializes a new instance of the <see cref="InsertMessage"/> class.
 /// </summary>
 public InsertMessage(BsonWriterSettings bsonWriterSettings)
 {
     if(bsonWriterSettings == null)
         throw new ArgumentNullException("bsonWriterSettings");
     
     _bsonWriterSettings = bsonWriterSettings;
     Header = new MessageHeader(OpCode.Insert);
 }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GetMoreMessage"/> class.
 /// </summary>
 /// <param name="fullCollectionName">Full name of the collection.</param>
 /// <param name="cursorId">The cursor id.</param>
 /// <param name="numberToReturn">The number to return.</param>
 public GetMoreMessage(string fullCollectionName, long cursorId, int numberToReturn)
     : base(new BsonWriterSettings())
 {
     Header = new MessageHeader(OpCode.GetMore);
     FullCollectionName = fullCollectionName;
     CursorId = cursorId;
     NumberToReturn = numberToReturn;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryMessage"/> class.
 /// </summary>
 /// <param name="bsonWriterSettings">The bson writer settings.</param>
 /// <param name="query">The query.</param>
 /// <param name="fullCollectionName">Full name of the collection.</param>
 /// <param name="numberToReturn">The number to return.</param>
 /// <param name="numberToSkip">The number to skip.</param>
 /// <param name="returnFieldSelector">The return field selector.</param>
 public QueryMessage(BsonWriterSettings bsonWriterSettings,
     object query,
     String fullCollectionName,
     Int32 numberToReturn,
     Int32 numberToSkip,
     object returnFieldSelector)
     : base(bsonWriterSettings)
 {
     Header = new MessageHeader(OpCode.Query);
     Query = query;
     FullCollectionName = fullCollectionName;
     NumberToReturn = numberToReturn;
     NumberToSkip = numberToSkip;
     ReturnFieldSelector = returnFieldSelector;
 }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UpdateMessage"/> class.
 /// </summary>
 /// <param name="bsonWriterSettings">The bson writer settings.</param>
 public UpdateMessage(BsonWriterSettings bsonWriterSettings)
     : base(bsonWriterSettings){
     Header = new MessageHeader(OpCode.Update);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryMessage"/> class.
 /// </summary>
 /// <param name="bsonWriterSettings">The bson writer settings.</param>
 public QueryMessage(BsonWriterSettings bsonWriterSettings)
     : base(bsonWriterSettings){
     Header = new MessageHeader(OpCode.Query);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="MsgMessage"/> class.
 /// </summary>
 public MsgMessage()
     : base(new BsonWriterSettings()){
     Header = new MessageHeader(OpCode.Msg);
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="KillCursorsMessage"/> class.
 /// </summary>
 public KillCursorsMessage()
     :base(new BsonWriterSettings()){
     Header = new MessageHeader(OpCode.KillCursors);
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="QueryMessage"/> class.
 /// </summary>
 /// <param name="bsonWriterSettings">The bson writer settings.</param>
 public QueryMessage(BsonWriterSettings bsonWriterSettings)
     : base(bsonWriterSettings)
 {
     Header = new MessageHeader(OpCode.Query);
 }