Class BsonReader
Represents a BSON reader for some external format (see subclasses).
public abstract class BsonReader : IBsonReader, IDisposable
  - Inheritance
 - 
      
      BsonReader
 
- Implements
 
- Derived
 
- Inherited Members
 
- Extension Methods
 
Constructors
- BsonReader(BsonReaderSettings)
 Initializes a new instance of the BsonReader class.
Properties
- CurrentBsonType
 Gets the current BsonType.
- CurrentName
 Gets the current name.
- Disposed
 Gets whether the BsonReader has been disposed.
- Settings
 Gets the settings of the reader.
- State
 Gets the current state of the reader.
Methods
- Close()
 Closes the reader.
- Dispose()
 Disposes of any resources used by the reader.
- Dispose(bool)
 Disposes of any resources used by the reader.
- GetBookmark()
 Gets a bookmark to the reader's current position and state.
- GetCurrentBsonType()
 Gets the current BsonType (calls ReadBsonType if necessary).
- IsAtEndOfFile()
 Determines whether this reader is at end of file.
- PopSettings()
 Pops the settings.
- PushSettings(Action<BsonReaderSettings>)
 Pushes new settings for the reader.
- ReadBinaryData()
 Reads BSON binary data from the reader.
- ReadBoolean()
 Reads a BSON boolean from the reader.
- ReadBsonType()
 Reads a BsonType from the reader.
- ReadBytes()
 Reads BSON binary data from the reader.
- ReadDateTime()
 Reads a BSON DateTime from the reader.
- ReadDecimal128()
 Reads a BSON Decimal128 from the reader.
- ReadDouble()
 Reads a BSON Double from the reader.
- ReadEndArray()
 Reads the end of a BSON array from the reader.
- ReadEndDocument()
 Reads the end of a BSON document from the reader.
- ReadGuid()
 Reads a Guid from the reader.
- ReadGuid(GuidRepresentation)
 Reads a Guid with the specified representation from the reader.
- ReadInt32()
 Reads a BSON Int32 from the reader.
- ReadInt64()
 Reads a BSON Int64 from the reader.
- ReadJavaScript()
 Reads a BSON JavaScript from the reader.
- ReadJavaScriptWithScope()
 Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope).
- ReadMaxKey()
 Reads a BSON MaxKey from the reader.
- ReadMinKey()
 Reads a BSON MinKey from the reader.
- ReadName()
 Reads the name of an element from the reader.
- ReadName(INameDecoder)
 Reads the name of an element from the reader (using the provided name decoder).
- ReadNull()
 Reads a BSON null from the reader.
- ReadObjectId()
 Reads a BSON ObjectId from the reader.
- ReadRawBsonArray()
 Reads a raw BSON array.
- ReadRawBsonDocument()
 Reads a raw BSON document.
- ReadRegularExpression()
 Reads a BSON regular expression from the reader.
- ReadStartArray()
 Reads the start of a BSON array.
- ReadStartDocument()
 Reads the start of a BSON document.
- ReadString()
 Reads a BSON string from the reader.
- ReadSymbol()
 Reads a BSON symbol from the reader.
- ReadTimestamp()
 Reads a BSON timestamp from the reader.
- ReadUndefined()
 Reads a BSON undefined from the reader.
- ReturnToBookmark(BsonReaderBookmark)
 Returns the reader to previously bookmarked position and state.
- SkipName()
 Skips the name (reader must be positioned on a name).
- SkipValue()
 Skips the value (reader must be positioned on a value).
- ThrowInvalidContextType(string, ContextType, params ContextType[])
 Throws an InvalidOperationException when the method called is not valid for the current ContextType.
- ThrowInvalidState(string, params BsonReaderState[])
 Throws an InvalidOperationException when the method called is not valid for the current state.
- ThrowObjectDisposedException()
 Throws an ObjectDisposedException.
- VerifyBsonType(string, BsonType)
 Verifies the current state and BsonType of the reader.