Represents a BSON document. More...
Public Member Functions | |
| BsonDocument () | |
| Initializes a new instance of the BsonDocument class. | |
| BsonDocument (bool allowDuplicateNames) | |
| Initializes a new instance of the BsonDocument class specifying whether duplicate element names are allowed (allowing duplicate element names is not recommended). | |
| BsonDocument (BsonElement element) | |
| Initializes a new instance of the BsonDocument class and adds one element. | |
| BsonDocument (Dictionary< string, object > dictionary) | |
| Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. | |
| BsonDocument (Dictionary< string, object > dictionary, IEnumerable< string > keys) | |
| Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. | |
| BsonDocument (IDictionary< string, object > dictionary) | |
| Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. | |
| BsonDocument (IDictionary< string, object > dictionary, IEnumerable< string > keys) | |
| Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. | |
| BsonDocument (IDictionary dictionary) | |
| Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. | |
| BsonDocument (IDictionary dictionary, IEnumerable keys) | |
| Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs. | |
| BsonDocument (IEnumerable< BsonElement > elements) | |
| Initializes a new instance of the BsonDocument class and adds new elements from a list of elements. | |
| BsonDocument (params BsonElement[] elements) | |
| Initializes a new instance of the BsonDocument class and adds one or more elements. | |
| BsonDocument (string name, BsonValue value) | |
| Initializes a new instance of the BsonDocument class and creates and adds a new element. | |
| BsonDocument | Add (BsonElement element) |
| Adds an element to the document. | |
| BsonDocument | Add (Dictionary< string, object > dictionary) |
| Adds elements to the document from a dictionary of key/value pairs. | |
| BsonDocument | Add (Dictionary< string, object > dictionary, IEnumerable< string > keys) |
| Adds elements to the document from a dictionary of key/value pairs. | |
| BsonDocument | Add (IDictionary< string, object > dictionary) |
| Adds elements to the document from a dictionary of key/value pairs. | |
| BsonDocument | Add (IDictionary< string, object > dictionary, IEnumerable< string > keys) |
| Adds elements to the document from a dictionary of key/value pairs. | |
| BsonDocument | Add (IDictionary dictionary) |
| Adds elements to the document from a dictionary of key/value pairs. | |
| BsonDocument | Add (IDictionary dictionary, IEnumerable keys) |
| Adds elements to the document from a dictionary of key/value pairs. | |
| BsonDocument | Add (IEnumerable< BsonElement > elements) |
| Adds a list of elements to the document. | |
| BsonDocument | Add (params BsonElement[] elements) |
| Adds a list of elements to the document. | |
| BsonDocument | Add (string name, BsonValue value) |
| Creates and adds an element to the document. | |
| BsonDocument | Add (string name, BsonValue value, bool condition) |
| Creates and adds an element to the document, but only if the condition is true. | |
| void | Clear () |
| Clears the document (removes all elements). | |
| override BsonValue | Clone () |
| Creates a shallow clone of the document (see also DeepClone). | |
| int | CompareTo (BsonDocument other) |
| Compares this document to another document. | |
| override int | CompareTo (BsonValue other) |
| Compares the BsonDocument to another BsonValue. | |
| bool | Contains (string name) |
| Tests whether the document contains an element with the specified name. | |
| bool | ContainsValue (BsonValue value) |
| Tests whether the document contains an element with the specified value. | |
| override BsonValue | DeepClone () |
| Creates a deep clone of the document (see also Clone). | |
| object | Deserialize (BsonReader bsonReader, Type nominalType, IBsonSerializationOptions options) |
| Deserializes the document from a BsonReader. | |
| bool | GetDocumentId (out object id, out Type idNominalType, out IIdGenerator idGenerator) |
| Gets the Id of the document. | |
| bool | Equals (BsonDocument rhs) |
| Compares this document to another document. | |
| override bool | Equals (object obj) |
| Compares this BsonDocument to another object. | |
| BsonElement | GetElement (int index) |
| Gets an element of this document. | |
| BsonElement | GetElement (string name) |
| Gets an element of this document. | |
| IEnumerator< BsonElement > | GetEnumerator () |
| Gets an enumerator that can be used to enumerate the elements of this document. | |
| override int | GetHashCode () |
| Gets the hash code. | |
| BsonValue | GetValue (int index) |
| Gets the value of an element. | |
| BsonValue | GetValue (string name) |
| Gets the value of an element. | |
| BsonValue | GetValue (string name, BsonValue defaultValue) |
| Gets the value of an element or a default value if the element is not found. | |
| void | InsertAt (int index, BsonElement element) |
| Inserts a new element at a specified position. | |
| BsonDocument | Merge (BsonDocument document) |
| Merges another document into this one. Existing elements are not overwritten. | |
| BsonDocument | Merge (BsonDocument document, bool overwriteExistingElements) |
| Merges another document into this one, specifying whether existing elements are overwritten. | |
| void | Remove (string name) |
| Removes an element from this document (if duplicate element names are allowed then all elements with this name will be removed). | |
| void | RemoveAt (int index) |
| Removes an element from this document. | |
| void | RemoveElement (BsonElement element) |
| Removes an element from this document. | |
| void | Serialize (BsonWriter bsonWriter, Type nominalType, IBsonSerializationOptions options) |
| Serializes this document to a BsonWriter. | |
| BsonDocument | Set (int index, BsonValue value) |
| Sets the value of an element. | |
| BsonDocument | Set (string name, BsonValue value) |
| Sets the value of an element (an element will be added if no element with this name is found). | |
| void | SetDocumentId (object id) |
| Sets the document Id. | |
| BsonDocument | SetElement (int index, BsonElement element) |
| Sets an element of the document (replacing the existing element at that position). | |
| BsonDocument | SetElement (BsonElement element) |
| Sets an element of the document (replaces any existing element with the same name or adds a new element if an element with the same name is not found). | |
| Dictionary< string, object > | ToDictionary () |
| Converts the BsonDocument to a Dictionary<string, object>. | |
| Hashtable | ToHashtable () |
| Converts the BsonDocument to a Hashtable. | |
| override string | ToString () |
| Returns a string representation of the document. | |
| bool | TryGetElement (string name, out BsonElement value) |
| Tries to get an element of this document. | |
| bool | TryGetValue (string name, out BsonValue value) |
| Tries to get the value of an element of this document. | |
| new void | WriteTo (BsonWriter bsonWriter) |
| Writes the document to a BsonWriter. | |
| void | WriteTo (BsonBuffer buffer) |
| Writes the document to a BsonBuffer. | |
| void | WriteTo (Stream stream) |
| Writes the document to a Stream. | |
| void | WriteTo (string filename) |
| Writes the document to a file. | |
Public Member Functions inherited from SequoiaDB.Bson.BsonValue | |
| int | CompareTypeTo (BsonValue other) |
| Compares the type of this BsonValue to the type of another BsonValue. | |
| bool | Equals (BsonValue rhs) |
| Compares this BsonValue to another BsonValue. | |
| override bool | Equals (object obj) |
| Compares this BsonValue to another object. | |
| override int | GetHashCode () |
| Gets the hash code. | |
| bool | ToBoolean () |
| Converts this BsonValue to a Boolean (using the JavaScript definition of truthiness). | |
| double | ToDouble () |
| Converts this BsonValue to a Double. | |
| int | ToInt32 () |
| Converts this BsonValue to an Int32. | |
| long | ToInt64 () |
| Converts this BsonValue to an Int64. | |
| void | WriteTo (BsonWriter bsonWriter) |
| Writes the BsonValue to a BsonWriter. | |
Public Member Functions inherited from SequoiaDB.Bson.IConvertibleToBsonDocument | |
| BsonDocument | ToBsonDocument () |
| Converts this object to a BsonDocument. | |
Static Public Member Functions | |
| static bool | operator!= (BsonDocument lhs, BsonDocument rhs) |
| Compares two BsonDocument values. | |
| static bool | operator== (BsonDocument lhs, BsonDocument rhs) |
| Compares two BsonDocument values. | |
| static new BsonDocument | Create (object value) |
| Creates a new BsonDocument by mapping an object to a BsonDocument. | |
| static BsonDocument | Parse (string json) |
| Parses a JSON string and returns a BsonDocument. | |
| static BsonDocument | ReadFrom (BsonBuffer buffer) |
| Reads a BsonDocument from a BsonBuffer. | |
| static new BsonDocument | ReadFrom (BsonReader bsonReader) |
| Reads a BsonDocument from a BsonReader. | |
| static BsonDocument | ReadFrom (byte[] bytes) |
| Reads a BsonDocument from a byte array. | |
| static BsonDocument | ReadFrom (byte[] bytes, int index, int count) |
| Reads a BsonDocument from a byte array. | |
| static BsonDocument | ReadFrom (Stream stream) |
| Reads a BsonDocument from a stream. | |
| static BsonDocument | ReadFrom (string filename) |
| Reads a BsonDocument from a file. | |
Static Public Member Functions inherited from SequoiaDB.Bson.BsonValue | |
| static | operator bool (BsonValue value) |
| Casts a BsonValue to a bool. | |
| static | operator bool? (BsonValue value) |
| Casts a BsonValue to a bool?. | |
| static implicit | operator BsonValue (bool value) |
| Converts a bool to a BsonValue. | |
| static implicit | operator BsonValue (bool?value) |
| Converts a bool? to a BsonValue. | |
| static implicit | operator BsonValue (byte[] value) |
| Converts a byte[] to a BsonValue. | |
| static implicit | operator BsonValue (DateTime value) |
| Converts a DateTime to a BsonValue. | |
| static implicit | operator BsonValue (DateTime?value) |
| Converts a DateTime? to a BsonValue. | |
| static implicit | operator BsonValue (double value) |
| Converts a double to a BsonValue. | |
| static implicit | operator BsonValue (double?value) |
| Converts a double? to a BsonValue. | |
| static implicit | operator BsonValue (Enum value) |
| Converts an Enum to a BsonValue. | |
| static implicit | operator BsonValue (Guid value) |
| Converts a Guid to a BsonValue. | |
| static implicit | operator BsonValue (Guid?value) |
| Converts a Guid? to a BsonValue. | |
| static implicit | operator BsonValue (int value) |
| Converts an int to a BsonValue. | |
| static implicit | operator BsonValue (int?value) |
| Converts an int? to a BsonValue. | |
| static implicit | operator BsonValue (long value) |
| Converts a long to a BsonValue. | |
| static implicit | operator BsonValue (long?value) |
| Converts a long? to a BsonValue. | |
| static implicit | operator BsonValue (decimal value) |
| Converts a decimal to a BsonValue. | |
| static implicit | operator BsonValue (decimal?value) |
| Converts a decimal? to a BsonValue. | |
| static implicit | operator BsonValue (ObjectId value) |
| Converts an ObjectId to a BsonValue. | |
| static implicit | operator BsonValue (ObjectId?value) |
| Converts an ObjectId? to a BsonValue. | |
| static implicit | operator BsonValue (Regex value) |
| Converts a Regex to a BsonValue. | |
| static implicit | operator BsonValue (string value) |
| Converts a string to a BsonValue. | |
| static | operator byte[] (BsonValue value) |
| Casts a BsonValue to a byte[]. | |
| static | operator DateTime (BsonValue value) |
| Casts a BsonValue to a DateTime. | |
| static | operator DateTime? (BsonValue value) |
| Casts a BsonValue to a DateTime?. | |
| static | operator double (BsonValue value) |
| Casts a BsonValue to a double. | |
| static | operator double? (BsonValue value) |
| Casts a BsonValue to a double?. | |
| static | operator Guid (BsonValue value) |
| Casts a BsonValue to a Guid. | |
| static | operator Guid? (BsonValue value) |
| Casts a BsonValue to a Guid?. | |
| static | operator int (BsonValue value) |
| Casts a BsonValue to an int. | |
| static | operator int? (BsonValue value) |
| Casts a BsonValue to an int?. | |
| static | operator long (BsonValue value) |
| Casts a BsonValue to a long. | |
| static | operator long? (BsonValue value) |
| Casts a BsonValue to a long?. | |
| static | operator decimal (BsonValue value) |
| Casts a BsonValue to a decimal. | |
| static | operator decimal? (BsonValue value) |
| Casts a BsonValue to a decimal?. | |
| static | operator ObjectId (BsonValue value) |
| Casts a BsonValue to an ObjectId. | |
| static | operator ObjectId? (BsonValue value) |
| Casts a BsonValue to an ObjectId?. | |
| static | operator Regex (BsonValue value) |
| Casts a BsonValue to a Regex. | |
| static | operator string (BsonValue value) |
| Casts a BsonValue to a string. | |
| static bool | operator< (BsonValue lhs, BsonValue rhs) |
| Compares two BsonValues. | |
| static bool | operator<= (BsonValue lhs, BsonValue rhs) |
| Compares two BsonValues. | |
| static bool | operator!= (BsonValue lhs, BsonValue rhs) |
| Compares two BsonValues. | |
| static bool | operator== (BsonValue lhs, BsonValue rhs) |
| Compares two BsonValues. | |
| static bool | operator> (BsonValue lhs, BsonValue rhs) |
| Compares two BsonValues. | |
| static bool | operator>= (BsonValue lhs, BsonValue rhs) |
| Compares two BsonValues. | |
| static BsonValue | Create (object value) |
| Creates a new instance of the BsonValue class. | |
| static BsonValue | ReadFrom (BsonReader bsonReader) |
| Reads one BsonValue from a BsonReader. | |
Properties | |
| bool | AllowDuplicateNames [get, set] |
| Gets or sets whether to allow duplicate names (allowing duplicate names is not recommended). | |
| int | ElementCount [get] |
| Gets the number of elements. | |
| IEnumerable< BsonElement > | Elements [get] |
| Gets the elements. | |
| IEnumerable< string > | Names [get] |
| Gets the element names. | |
| IEnumerable< object > | RawValues [get] |
| Gets the raw values (see BsonValue.RawValue). | |
| IEnumerable< BsonValue > | Values [get] |
| Gets the values. | |
| BsonValue | this[int index] [get, set] |
| Gets or sets the value of an element. | |
| BsonValue | this[string name, BsonValue defaultValue] [get] |
| Gets the value of an element or a default value if the element is not found. | |
| BsonValue | this[string name] [get, set] |
| Gets or sets the value of an element. | |
Properties inherited from SequoiaDB.Bson.BsonValue | |
| bool | AsBoolean [get] |
| Casts the BsonValue to a Boolean (throws an InvalidCastException if the cast is not valid). | |
| BsonArray | AsBsonArray [get] |
| Casts the BsonValue to a BsonArray (throws an InvalidCastException if the cast is not valid). | |
| BsonBinaryData | AsBsonBinaryData [get] |
| Casts the BsonValue to a BsonBinaryData (throws an InvalidCastException if the cast is not valid). | |
| BsonDateTime | AsBsonDateTime [get] |
| Casts the BsonValue to a BsonDateTime (throws an InvalidCastException if the cast is not valid). | |
| BsonDocument | AsBsonDocument [get] |
| Casts the BsonValue to a BsonDocument (throws an InvalidCastException if the cast is not valid). | |
| BsonJavaScript | AsBsonJavaScript [get] |
| Casts the BsonValue to a BsonJavaScript (throws an InvalidCastException if the cast is not valid). | |
| BsonJavaScriptWithScope | AsBsonJavaScriptWithScope [get] |
| Casts the BsonValue to a BsonJavaScriptWithScope (throws an InvalidCastException if the cast is not valid). | |
| BsonMaxKey | AsBsonMaxKey [get] |
| Casts the BsonValue to a BsonMaxKey (throws an InvalidCastException if the cast is not valid). | |
| BsonMinKey | AsBsonMinKey [get] |
| Casts the BsonValue to a BsonMinKey (throws an InvalidCastException if the cast is not valid). | |
| BsonNull | AsBsonNull [get] |
| Casts the BsonValue to a BsonNull (throws an InvalidCastException if the cast is not valid). | |
| BsonRegularExpression | AsBsonRegularExpression [get] |
| Casts the BsonValue to a BsonRegularExpression (throws an InvalidCastException if the cast is not valid). | |
| BsonSymbol | AsBsonSymbol [get] |
| Casts the BsonValue to a BsonSymbol (throws an InvalidCastException if the cast is not valid). | |
| BsonTimestamp | AsBsonTimestamp [get] |
| Casts the BsonValue to a BsonTimestamp (throws an InvalidCastException if the cast is not valid). | |
| BsonDecimal | AsBsonDecimal [get] |
| Casts the BsonValue to a BsonDecimal (throws an InvalidCastException if the cast is not valid). | |
| decimal | AsDecimal [get] |
| Casts the BsonValue to a decimal (throws an InvalidCastException if the cast is not valid). | |
| BsonUndefined | AsBsonUndefined [get] |
| Casts the BsonValue to a BsonUndefined (throws an InvalidCastException if the cast is not valid). | |
| BsonValue | AsBsonValue [get] |
| Casts the BsonValue to a BsonValue (a way of upcasting subclasses of BsonValue to BsonValue at compile time). | |
| byte[] | AsByteArray [get] |
| Casts the BsonValue to a Byte[] (throws an InvalidCastException if the cast is not valid). | |
| DateTime | AsDateTime [get] |
| Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid). | |
| double | AsDouble [get] |
| Casts the BsonValue to a Double (throws an InvalidCastException if the cast is not valid). | |
| Guid | AsGuid [get] |
| Casts the BsonValue to a Guid (throws an InvalidCastException if the cast is not valid). | |
| int | AsInt32 [get] |
| Casts the BsonValue to an Int32 (throws an InvalidCastException if the cast is not valid). | |
| DateTime | AsLocalTime [get] |
| Casts the BsonValue to a DateTime in the local timezone (throws an InvalidCastException if the cast is not valid). | |
| long | AsInt64 [get] |
| Casts the BsonValue to a Int64 (throws an InvalidCastException if the cast is not valid). | |
| bool | AsNullableBoolean [get] |
| Casts the BsonValue to a Nullable{Boolean} (throws an InvalidCastException if the cast is not valid). | |
| DateTime | AsNullableDateTime [get] |
| Casts the BsonValue to a Nullable{DateTime} (throws an InvalidCastException if the cast is not valid). | |
| double | AsNullableDouble [get] |
| Casts the BsonValue to a Nullable{Double} (throws an InvalidCastException if the cast is not valid). | |
| Guid | AsNullableGuid [get] |
| Casts the BsonValue to a Nullable{Guid} (throws an InvalidCastException if the cast is not valid). | |
| int | AsNullableInt32 [get] |
| Casts the BsonValue to a Nullable{Int32} (throws an InvalidCastException if the cast is not valid). | |
| long | AsNullableInt64 [get] |
| Casts the BsonValue to a Nullable{Int64} (throws an InvalidCastException if the cast is not valid). | |
| decimal | AsNullableDecimal [get] |
| Casts the BsonValue to a Nullable{decimal} (throws an InvalidCastException if the cast is not valid). | |
| ObjectId | AsNullableObjectId [get] |
| Casts the BsonValue to a Nullable{ObjectId} (throws an InvalidCastException if the cast is not valid). | |
| ObjectId | AsObjectId [get] |
| Casts the BsonValue to an ObjectId (throws an InvalidCastException if the cast is not valid). | |
| Regex | AsRegex [get] |
| Casts the BsonValue to a Regex (throws an InvalidCastException if the cast is not valid). | |
| string | AsString [get] |
| Casts the BsonValue to a String (throws an InvalidCastException if the cast is not valid). | |
| DateTime | AsUniversalTime [get] |
| Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid). | |
| BsonType | BsonType [get] |
| Gets the BsonType of this BsonValue. | |
| bool | IsBoolean [get] |
| Tests whether this BsonValue is a Boolean. | |
| bool | IsBsonArray [get] |
| Tests whether this BsonValue is a BsonArray. | |
| bool | IsBsonBinaryData [get] |
| Tests whether this BsonValue is a BsonBinaryData. | |
| bool | IsBsonDateTime [get] |
| Tests whether this BsonValue is a BsonDateTime. | |
| bool | IsBsonDocument [get] |
| Tests whether this BsonValue is a BsonDocument. | |
| bool | IsBsonJavaScript [get] |
| Tests whether this BsonValue is a BsonJavaScript. | |
| bool | IsBsonJavaScriptWithScope [get] |
| Tests whether this BsonValue is a BsonJavaScriptWithScope. | |
| bool | IsBsonMaxKey [get] |
| Tests whether this BsonValue is a BsonMaxKey. | |
| bool | IsBsonMinKey [get] |
| Tests whether this BsonValue is a BsonMinKey. | |
| bool | IsBsonNull [get] |
| Tests whether this BsonValue is a BsonNull. | |
| bool | IsBsonRegularExpression [get] |
| Tests whether this BsonValue is a BsonRegularExpression. | |
| bool | IsBsonSymbol [get] |
| Tests whether this BsonValue is a BsonSymbol . | |
| bool | IsBsonTimestamp [get] |
| Tests whether this BsonValue is a BsonTimestamp. | |
| bool | IsBsonDecimal [get] |
| Tests whether this BsonValue is a BsonDecimal. | |
| bool | IsBsonUndefined [get] |
| Tests whether this BsonValue is a BsonUndefined. | |
| bool | IsDateTime [get] |
| Tests whether this BsonValue is a DateTime. | |
| bool | IsDouble [get] |
| Tests whether this BsonValue is a Double. | |
| bool | IsGuid [get] |
| Tests whether this BsonValue is a Guid. | |
| bool | IsInt32 [get] |
| Tests whether this BsonValue is an Int32. | |
| bool | IsInt64 [get] |
| Tests whether this BsonValue is an Int64. | |
| bool | IsNumeric [get] |
| Tests whether this BsonValue is a numeric value. | |
| bool | IsObjectId [get] |
| Tests whether this BsonValue is an ObjectId . | |
| bool | IsString [get] |
| Tests whether this BsonValue is a String. | |
| virtual object | RawValue [get] |
| Gets the raw value of this BsonValue (or null if this BsonValue doesn't have a single scalar value). | |
Additional Inherited Members | |
Protected Member Functions inherited from SequoiaDB.Bson.BsonValue | |
| BsonValue (BsonType bsonType) | |
| Initializes a new instance of the BsonValue class. | |
| virtual bool | OperatorEqualsImplementation (BsonValue rhs) |
| Implementation of operator ==. | |
Represents a BSON document.
|
inline |
Initializes a new instance of the BsonDocument class.
|
inline |
Initializes a new instance of the BsonDocument class specifying whether duplicate element names are allowed (allowing duplicate element names is not recommended).
| allowDuplicateNames | Whether duplicate element names are allowed. |
|
inline |
Initializes a new instance of the BsonDocument class and adds one element.
| element | An element to add to the document. |
|
inline |
Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs.
| dictionary | A dictionary to initialize the document from. |
|
inline |
Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs.
| dictionary | A dictionary to initialize the document from. |
| keys | A list of keys to select values from the dictionary. |
|
inline |
Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs.
| dictionary | A dictionary to initialize the document from. |
|
inline |
Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs.
| dictionary | A dictionary to initialize the document from. |
| keys | A list of keys to select values from the dictionary. |
|
inline |
Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs.
| dictionary | A dictionary to initialize the document from. |
|
inline |
Initializes a new instance of the BsonDocument class and adds new elements from a dictionary of key/value pairs.
| dictionary | A dictionary to initialize the document from. |
| keys | A list of keys to select values from the dictionary. |
|
inline |
Initializes a new instance of the BsonDocument class and adds new elements from a list of elements.
| elements | A list of elements to add to the document. |
|
inline |
Initializes a new instance of the BsonDocument class and adds one or more elements.
| elements | One or more elements to add to the document. |
|
inline |
Initializes a new instance of the BsonDocument class and creates and adds a new element.
| name | The name of the element to add to the document. |
| value | The value of the element to add to the document. |
|
inline |
Adds an element to the document.
| element | The element to add. |
|
inline |
Adds elements to the document from a dictionary of key/value pairs.
| dictionary | The dictionary. |
|
inline |
Adds elements to the document from a dictionary of key/value pairs.
| dictionary | The dictionary. |
| keys | Which keys of the hash table to add. |
|
inline |
Adds elements to the document from a dictionary of key/value pairs.
| dictionary | The dictionary. |
|
inline |
Adds elements to the document from a dictionary of key/value pairs.
| dictionary | The dictionary. |
| keys | Which keys of the hash table to add. |
|
inline |
Adds elements to the document from a dictionary of key/value pairs.
| dictionary | The dictionary. |
|
inline |
Adds elements to the document from a dictionary of key/value pairs.
| dictionary | The dictionary. |
| keys | Which keys of the hash table to add. |
|
inline |
Adds a list of elements to the document.
| elements | The list of elements. |
|
inline |
Adds a list of elements to the document.
| elements | The list of elements. |
|
inline |
Creates and adds an element to the document.
| name | The name of the element. |
| value | The value of the element. |
|
inline |
Creates and adds an element to the document, but only if the condition is true.
| name | The name of the element. |
| value | The value of the element. |
| condition | Whether to add the element to the document. |
|
inline |
Clears the document (removes all elements).
|
inlinevirtual |
Creates a shallow clone of the document (see also DeepClone).
Reimplemented from SequoiaDB.Bson.BsonValue.
|
inline |
Compares this document to another document.
| other | The other document. |
|
inlinevirtual |
Compares the BsonDocument to another BsonValue.
| other | The other BsonValue. |
Implements SequoiaDB.Bson.BsonValue.
|
inline |
Tests whether the document contains an element with the specified name.
| name | The name of the element to look for. |
|
inline |
Tests whether the document contains an element with the specified value.
| value | The value of the element to look for. |
|
inlinestatic |
Creates a new BsonDocument by mapping an object to a BsonDocument.
| value | The object to be mapped to a BsonDocument. |
|
inlinevirtual |
Creates a deep clone of the document (see also Clone).
Reimplemented from SequoiaDB.Bson.BsonValue.
|
inline |
Deserializes the document from a BsonReader.
| bsonReader | The BsonReader. |
| nominalType | The nominal type of the object (ignored, but should be BsonDocument). |
| options | The serialization options (ignored). |
|
inline |
Compares this document to another document.
| rhs | The other document. |
|
inline |
Compares this BsonDocument to another object.
| obj | The other object. |
|
inline |
Gets the Id of the document.
| id | The Id of the document (the RawValue if it has one, otherwise the element Value). |
| idNominalType | The nominal type of the Id. |
| idGenerator | The IdGenerator for the Id (or null). |
|
inline |
Gets an element of this document.
| index | The zero based index of the element. |
|
inline |
|
inline |
Gets an enumerator that can be used to enumerate the elements of this document.
|
inline |
Gets the hash code.
|
inline |
Gets the value of an element.
| index | The zero based index of the element. |
|
inline |
Gets the value of an element.
| name | The name of the element. |
Gets the value of an element or a default value if the element is not found.
| name | The name of the element. |
| defaultValue | The default value returned if the element is not found. |
|
inline |
Inserts a new element at a specified position.
| index | The position of the new element. |
| element | The element. |
|
inline |
Merges another document into this one. Existing elements are not overwritten.
| document | The other document. |
|
inline |
Merges another document into this one, specifying whether existing elements are overwritten.
| document | The other document. |
| overwriteExistingElements | Whether to overwrite existing elements. |
|
inlinestatic |
Compares two BsonDocument values.
| lhs | The first BsonDocument. |
| rhs | The other BsonDocument. |
|
inlinestatic |
Compares two BsonDocument values.
| lhs | The first BsonDocument. |
| rhs | The other BsonDocument. |
|
inlinestatic |
Parses a JSON string and returns a BsonDocument.
| json | The JSON string. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inline |
Removes an element from this document (if duplicate element names are allowed then all elements with this name will be removed).
| name | The name of the element to remove. |
|
inline |
Removes an element from this document.
| index | The zero based index of the element to remove. |
|
inline |
Removes an element from this document.
| element | The element to remove. |
|
inline |
Serializes this document to a BsonWriter.
| bsonWriter | The writer. |
| nominalType | The nominalType. |
| options | The serialization options (can be null). |
|
inline |
Sets the value of an element.
| index | The zero based index of the element whose value is to be set. |
| value | The new value. |
|
inline |
Sets the value of an element (an element will be added if no element with this name is found).
| name | The name of the element whose value is to be set. |
| value | The new value. |
|
inline |
Sets the document Id.
| id | The value of the Id. |
|
inline |
Sets an element of the document (replacing the existing element at that position).
| index | The zero based index of the element to replace. |
| element | The new element. |
|
inline |
Sets an element of the document (replaces any existing element with the same name or adds a new element if an element with the same name is not found).
| element | The new element. |
|
inline |
Converts the BsonDocument to a Dictionary<string, object>.
|
inline |
Converts the BsonDocument to a Hashtable.
|
inline |
Returns a string representation of the document.
|
inline |
Tries to get an element of this document.
| name | The name of the element. |
| value | The element. |
|
inline |
Tries to get the value of an element of this document.
| name | The name of the element. |
| value | The value of the element. |
|
inline |
Writes the document to a BsonWriter.
| bsonWriter | The writer. |
|
inline |
Writes the document to a BsonBuffer.
| buffer | The buffer. |
|
inline |
Writes the document to a Stream.
| stream | The stream. |
|
inline |
Writes the document to a file.
| filename | The name of the file. |
|
getset |
Gets or sets whether to allow duplicate names (allowing duplicate names is not recommended).
|
get |
Gets the number of elements.
|
get |
Gets the elements.
|
get |
Gets the element names.
|
get |
Gets the raw values (see BsonValue.RawValue).
|
getset |
Gets or sets the value of an element.
| index | The zero based index of the element. |
Gets the value of an element or a default value if the element is not found.
| name | The name of the element. |
| defaultValue | The default value to return if the element is not found. |
|
getset |
Gets or sets the value of an element.
| name | The name of the element. |
|
get |
Gets the values.
1.8.2