Click or drag to resize

BsonValue Class

Represent a Bson Value used in BsonDocument
Inheritance Hierarchy
SystemObject
  Internal.LiteDBBsonValue
    Internal.LiteDBBsonArray
    Internal.LiteDBBsonDocument

Namespace: Internal.LiteDB
Assembly: NeoAxis.Core (in NeoAxis.Core.dll) Version: 2026.1.1.0 (2026.1.1.0)
Syntax
C#
public class BsonValue : IComparable<BsonValue>, 
	IEquatable<BsonValue>

The BsonValue type exposes the following members.

Constructors
 NameDescription
Public methodBsonValueInitializes a new instance of the BsonValue class
Public methodBsonValue(Boolean)Initializes a new instance of the BsonValue class
Public methodBsonValue(Byte)Initializes a new instance of the BsonValue class
Public methodBsonValue(DateTime)Initializes a new instance of the BsonValue class
Public methodBsonValue(Decimal)Initializes a new instance of the BsonValue class
Public methodBsonValue(Double)Initializes a new instance of the BsonValue class
Public methodBsonValue(Guid)Initializes a new instance of the BsonValue class
Public methodBsonValue(Int32)Initializes a new instance of the BsonValue class
Public methodBsonValue(Int64)Initializes a new instance of the BsonValue class
Public methodBsonValue(Object)Initializes a new instance of the BsonValue class
Public methodBsonValue(ObjectId)Initializes a new instance of the BsonValue class
Public methodBsonValue(String)Initializes a new instance of the BsonValue class
Protected methodBsonValue(BsonType, Object)Initializes a new instance of the BsonValue class
Top
Properties
 NameDescription
Public propertyAsArray 
Public propertyAsBinary 
Public propertyAsBoolean 
Public propertyAsDateTime 
Public propertyAsDecimal 
Public propertyAsDocument 
Public propertyAsDouble 
Public propertyAsGuid 
Public propertyAsInt32 
Public propertyAsInt64 
Public propertyAsObjectId 
Public propertyAsString 
Public propertyIsArray 
Public propertyIsBinary 
Public propertyIsBoolean 
Public propertyIsDateTime 
Public propertyIsDecimal 
Public propertyIsDocument 
Public propertyIsDouble 
Public propertyIsGuid 
Public propertyIsInt32 
Public propertyIsInt64 
Public propertyIsMaxValue 
Public propertyIsMinValue 
Public propertyIsNull 
Public propertyIsNumber 
Public propertyIsObjectId 
Public propertyIsString 
Public propertyItemInt32 Get/Set value in array position. Works only when value are array
Public propertyItemString Get/Set a field for document. Fields are case sensitive - Works only when value are document
Public propertyRawValue Get internal .NET value object
Public propertyType Indicate BsonType of this BsonValue
Top
Methods
 NameDescription
Public methodCompareTo(BsonValue) 
Public methodCompareTo(BsonValue, Collation) 
Public methodStatic memberDbRef Create a new document used in DbRef => { $id: id, $ref: collection }
Public methodEquals(BsonValue) 
Public methodEquals(Object)
(Overrides ObjectEquals(Object))
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Protected methodGetBytesCountElement Get how many bytes one single element will used in BSON format
Public methodGetHashCode
(Overrides ObjectGetHashCode)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToString
(Overrides ObjectToString)
Top
Operators
Fields
 NameDescription
Public fieldStatic memberMaxValue Represent a MaxValue bson type
Public fieldStatic memberMinValue Represent a MinValue bson type
Public fieldStatic memberNull Represent a Null bson type
Public fieldStatic memberUnixEpoch 
Top
Extension Methods
 NameDescription
Public Extension MethodMethodInvoke Calls the object method by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGet Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertyGetT Gets the value of the object property by name.
(Defined by ObjectEx)
Public Extension MethodPropertySet Sets the value of the object property by name.
(Defined by ObjectEx)
Top
See Also