Click or drag to resize

BsonDocumentReader Class

Represents a BSON reader for a BsonDocument.
Inheritance Hierarchy

Namespace:  MongoDB.Bson.IO
Assembly:  MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.15.0+f503bf610759c13f78cff9a3c01e91453185d2ed
Syntax
public class BsonDocumentReader : BsonReader

The BsonDocumentReader type exposes the following members.

Constructors
  NameDescription
Public methodBsonDocumentReader(BsonDocument)
Initializes a new instance of the BsonDocumentReader class.
Public methodBsonDocumentReader(BsonDocument, BsonDocumentReaderSettings)
Initializes a new instance of the BsonDocumentReader class.
Top
Properties
  NameDescription
Public propertyCurrentBsonType
Gets the current BsonType.
(Inherited from BsonReader.)
Protected propertyCurrentName
Gets the current name.
(Inherited from BsonReader.)
Protected propertyDisposed
Gets whether the BsonReader has been disposed.
(Inherited from BsonReader.)
Public propertySettings
Gets the settings of the reader.
(Inherited from BsonReader.)
Public propertyState
Gets the current state of the reader.
(Inherited from BsonReader.)
Top
Methods
  NameDescription
Public methodClose
Closes the reader.
(Overrides BsonReaderClose.)
Public methodDispose
Disposes of any resources used by the reader.
(Inherited from BsonReader.)
Protected methodDispose(Boolean)
Disposes of any resources used by the reader.
(Overrides BsonReaderDispose(Boolean).)
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.
(Overrides BsonReaderGetBookmark.)
Public methodGetCurrentBsonType
Gets the current BsonType (calls ReadBsonType if necessary).
(Inherited from BsonReader.)
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.
(Overrides BsonReaderIsAtEndOfFile.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodPopSettings
Pops the settings.
(Inherited from BsonReader.)
Public methodPushSettings
Pushes new settings for the reader.
(Inherited from BsonReader.)
Public methodReadBinaryData
Reads BSON binary data from the reader.
(Overrides BsonReaderReadBinaryData.)
Public methodReadBoolean
Reads a BSON boolean from the reader.
(Overrides BsonReaderReadBoolean.)
Public methodReadBsonType
Reads a BsonType from the reader.
(Overrides BsonReaderReadBsonType.)
Public methodReadBytes
Reads BSON binary data from the reader.
(Overrides BsonReaderReadBytes.)
Public methodReadDateTime
Reads a BSON DateTime from the reader.
(Overrides BsonReaderReadDateTime.)
Public methodReadDecimal128
Reads a BSON Decimal128 from the reader.
(Overrides BsonReaderReadDecimal128.)
Public methodReadDouble
Reads a BSON Double from the reader.
(Overrides BsonReaderReadDouble.)
Public methodReadEndArray
Reads the end of a BSON array from the reader.
(Overrides BsonReaderReadEndArray.)
Public methodReadEndDocument
Reads the end of a BSON document from the reader.
(Overrides BsonReaderReadEndDocument.)
Public methodReadInt32
Reads a BSON Int32 from the reader.
(Overrides BsonReaderReadInt32.)
Public methodReadInt64
Reads a BSON Int64 from the reader.
(Overrides BsonReaderReadInt64.)
Public methodReadJavaScript
Reads a BSON JavaScript from the reader.
(Overrides BsonReaderReadJavaScript.)
Public methodReadJavaScriptWithScope
Reads a BSON JavaScript with scope from the reader (call ReadStartDocument next to read the scope).
(Overrides BsonReaderReadJavaScriptWithScope.)
Public methodReadMaxKey
Reads a BSON MaxKey from the reader.
(Overrides BsonReaderReadMaxKey.)
Public methodReadMinKey
Reads a BSON MinKey from the reader.
(Overrides BsonReaderReadMinKey.)
Public methodReadName
Reads the name of an element from the reader.
(Inherited from BsonReader.)
Public methodReadName(INameDecoder)
Reads the name of an element from the reader.
(Overrides BsonReaderReadName(INameDecoder).)
Public methodReadNull
Reads a BSON null from the reader.
(Overrides BsonReaderReadNull.)
Public methodReadObjectId
Reads a BSON ObjectId from the reader.
(Overrides BsonReaderReadObjectId.)
Public methodReadRawBsonArray
Reads a raw BSON array.
(Inherited from BsonReader.)
Public methodReadRawBsonDocument
Reads a raw BSON document.
(Inherited from BsonReader.)
Public methodReadRegularExpression
Reads a BSON regular expression from the reader.
(Overrides BsonReaderReadRegularExpression.)
Public methodReadStartArray
Reads the start of a BSON array.
(Overrides BsonReaderReadStartArray.)
Public methodReadStartDocument
Reads the start of a BSON document.
(Overrides BsonReaderReadStartDocument.)
Public methodReadString
Reads a BSON string from the reader.
(Overrides BsonReaderReadString.)
Public methodReadSymbol
Reads a BSON symbol from the reader.
(Overrides BsonReaderReadSymbol.)
Public methodReadTimestamp
Reads a BSON timestamp from the reader.
(Overrides BsonReaderReadTimestamp.)
Public methodReadUndefined
Reads a BSON undefined from the reader.
(Overrides BsonReaderReadUndefined.)
Public methodReturnToBookmark
Returns the reader to previously bookmarked position and state.
(Overrides BsonReaderReturnToBookmark(BsonReaderBookmark).)
Public methodSkipName
Skips the name (reader must be positioned on a name).
(Overrides BsonReaderSkipName.)
Public methodSkipValue
Skips the value (reader must be positioned on a value).
(Overrides BsonReaderSkipValue.)
Protected methodThrowInvalidContextType
Throws an InvalidOperationException when the method called is not valid for the current ContextType.
(Inherited from BsonReader.)
Protected methodThrowInvalidState
Throws an InvalidOperationException when the method called is not valid for the current state.
(Inherited from BsonReader.)
Protected methodThrowObjectDisposedException
Throws an ObjectDisposedException.
(Inherited from BsonReader.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Protected methodVerifyBsonType
Verifies the current state and BsonType of the reader.
(Inherited from BsonReader.)
Top
Extension Methods
  NameDescription
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