/// <summary>
 /// Reads a BSON JavaScript from the reader.
 /// </summary>
 /// <returns>A string.</returns>
 public override string ReadJavaScript()
 {
     if (disposed)
     {
         ThrowObjectDisposedException();
     }
     VerifyBsonType("ReadJavaScript", BsonType.JavaScript);
     state = GetNextState();
     return(buffer.ReadString());
 }
Exemple #2
0
 /// <summary>
 /// Reads a BSON JavaScript from the reader.
 /// </summary>
 /// <returns>A string.</returns>
 public override string ReadJavaScript()
 {
     if (Disposed)
     {
         ThrowObjectDisposedException();
     }
     VerifyBsonType("ReadJavaScript", BsonType.JavaScript);
     State = GetNextState();
     return(_buffer.ReadString(_binaryReaderSettings.Encoding));
 }