Click or drag to resize

BsonReader Class

Represents a BSON reader for some external format (see subclasses).
Inheritance Hierarchy

Namespace:  MongoDB.Bson.IO
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.22.0+75246110ed1247226fcc7f8eb2c54ffab745693e
Syntax
public abstract class BsonReader : IBsonReader, 
	IDisposable

The BsonReader type exposes the following members.

Constructors
  NameDescription
Protected methodBsonReader
Initializes a new instance of the BsonReader class.
Top
Properties
  NameDescription
Public propertyCurrentBsonType
Gets the current BsonType.
Protected propertyCurrentName
Gets the current name.
Protected propertyDisposed
Gets whether the BsonReader has been disposed.
Public propertySettings
Gets the settings of the reader.
Public propertyState
Gets the current state of the reader.
Top
Methods
  NameDescription
Public methodClose
Closes the reader.
Public methodDispose
Disposes of any resources used by the reader.
Protected methodDispose(Boolean)
Disposes of any resources used by the reader.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBookmark
Gets a bookmark to the reader's current position and state.
Public methodGetCurrentBsonType
Gets the current BsonType (calls ReadBsonType if necessary).
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsAtEndOfFile
Determines whether this reader is at end of file.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPopSettings
Pops the settings.
Public methodPushSettings
Pushes new settings for the reader.
Public methodReadBinaryData
Reads BSON binary data from the reader.
Public methodReadBoolean
Reads a BSON boolean from the reader.
Public methodReadBsonType
Reads a BsonType from the reader.
Public methodReadBytes
Reads BSON binary data from the reader.
Public methodReadDateTime
Reads a BSON DateTime from the reader.
Public methodReadDecimal128
Reads a BSON Decimal128 from the reader.
Public methodReadDouble
Reads a BSON Double from the reader.
Public methodReadEndArray
Reads the end of a BSON array from the reader.
Public methodReadEndDocument
Reads the end of a BSON document from the reader.
Public methodReadInt32
Reads a BSON Int32 from the reader.
Public methodReadInt64
Reads a BSON Int64 from the reader.
Public methodReadJavaScript
Reads a BSON JavaScript from the reader.
Public methodReadJavaScriptWithScope
Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope).
Public methodReadMaxKey
Reads a BSON MaxKey from the reader.
Public methodReadMinKey
Reads a BSON MinKey from the reader.
Public methodReadName
Reads the name of an element from the reader.
Public methodReadName(INameDecoder)
Reads the name of an element from the reader (using the provided name decoder).
Public methodReadNull
Reads a BSON null from the reader.
Public methodReadObjectId
Reads a BSON ObjectId from the reader.
Public methodReadRawBsonArray
Reads a raw BSON array.
Public methodReadRawBsonDocument
Reads a raw BSON document.
Public methodReadRegularExpression
Reads a BSON regular expression from the reader.
Public methodReadStartArray
Reads the start of a BSON array.
Public methodReadStartDocument
Reads the start of a BSON document.
Public methodReadString
Reads a BSON string from the reader.
Public methodReadSymbol
Reads a BSON symbol from the reader.
Public methodReadTimestamp
Reads a BSON timestamp from the reader.
Public methodReadUndefined
Reads a BSON undefined from the reader.
Public methodReturnToBookmark
Returns the reader to previously bookmarked position and state.
Public methodSkipName
Skips the name (reader must be positioned on a name).
Public methodSkipValue
Skips the value (reader must be positioned on a value).
Protected methodThrowInvalidContextType
Throws an InvalidOperationException when the method called is not valid for the current ContextType.
Protected methodThrowInvalidState
Throws an InvalidOperationException when the method called is not valid for the current state.
Protected methodThrowObjectDisposedException
Throws an ObjectDisposedException.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodVerifyBsonType
Verifies the current state and BsonType of the reader.
Top
Extension Methods
  NameDescription
Public Extension MethodFindElement
Positions the reader to an element by name.
(Defined by IBsonReaderExtensions.)
Public Extension MethodFindStringElement
Positions the reader to a string element by name.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadBinaryData
Reads a BSON binary data element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadBinaryDataWithGuidRepresentationUnspecified
Reads a BSON binary data element from the reader temporarily setting the GuidRepresentation to Unspecified.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadBoolean
Reads a BSON boolean element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadBytes
Reads a BSON binary data element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadDateTime
Reads a BSON DateTime element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadDecimal128
Reads a BSON Decimal128 element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadDouble
Reads a BSON Double element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadInt32
Reads a BSON Int32 element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadInt64
Reads a BSON Int64 element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadJavaScript
Reads a BSON JavaScript element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadJavaScriptWithScope
Reads a BSON JavaScript with scope element from the reader (call ReadStartDocument next to read the scope).
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadMaxKey
Reads a BSON MaxKey element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadMinKey
Reads a BSON MinKey element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadNameOverloaded.
Reads the name of an element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadName(String)Overloaded.
Reads the name of an element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadNull
Reads a BSON null element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadObjectId
Reads a BSON ObjectId element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadRawBsonArray
Reads a raw BSON array.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadRawBsonDocument
Reads a raw BSON document.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadRegularExpression
Reads a BSON regular expression element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadString
Reads a BSON string element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadSymbol
Reads a BSON symbol element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadTimestamp
Reads a BSON timestamp element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodReadUndefined
Reads a BSON undefined element from the reader.
(Defined by IBsonReaderExtensions.)
Public Extension MethodToBson
Serializes an object to a BSON byte array.
(Defined by BsonExtensionMethods.)
Public Extension MethodToBsonDocument
Serializes an object to a BsonDocument.
(Defined by BsonExtensionMethods.)
Public Extension MethodToJson
Serializes an object to a JSON string.
(Defined by BsonExtensionMethods.)
Top
See Also