Exemple #1
0
 /// <summary>
 /// Reads a BSON ObjectId from the reader.
 /// </summary>
 /// <param name="timestamp">The timestamp.</param>
 /// <param name="machine">The machine hash.</param>
 /// <param name="pid">The PID.</param>
 /// <param name="increment">The increment.</param>
 public override void ReadObjectId(out int timestamp, out int machine, out short pid, out int increment)
 {
     if (Disposed)
     {
         ThrowObjectDisposedException();
     }
     VerifyBsonType("ReadObjectId", BsonType.ObjectId);
     _buffer.ReadObjectId(out timestamp, out machine, out pid, out increment);
     State = GetNextState();
 }
 /// <summary>
 /// Reads a BSON ObjectId from the reader.
 /// </summary>
 /// <returns>An ObjectId.</returns>
 public override ObjectId ReadObjectId()
 {
     if (Disposed)
     {
         ThrowObjectDisposedException();
     }
     VerifyBsonType("ReadObjectId", BsonType.ObjectId);
     State = GetNextState();
     return(_buffer.ReadObjectId());
 }