BsonValue Class (original) (raw)
Represents a BSON value (this is an abstract class, see the various subclasses).
Inheritance Hierarchy
Namespace: MongoDB.Bson
Assembly: MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.10.0+569905ff5e778c38ea19d9d0392496a83e1704ed
Syntax
[SerializableAttribute] public abstract class BsonValue : IComparable, IConvertible, IEquatable
Public MustInherit Class BsonValue Implements IComparable(Of BsonValue), IConvertible, IEquatable(Of BsonValue)[]
[]
type BsonValue =
class
interface IComparable
interface IConvertible
interface IEquatable
end
The BsonValue type exposes the following members.
Constructors
| | Name | Description | |
| ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------- |
| | BsonValue | Initializes a new instance of the BsonValue class |
Properties
| | Name | Description | |
| ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| | AsBoolean | Casts the BsonValue to a Boolean (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonArray | Casts the BsonValue to a BsonArray (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonBinaryData | Casts the BsonValue to a BsonBinaryData (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonDateTime | Casts the BsonValue to a BsonDateTime (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonDocument | Casts the BsonValue to a BsonDocument (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonJavaScript | Casts the BsonValue to a BsonJavaScript (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonJavaScriptWithScope | Casts the BsonValue to a BsonJavaScriptWithScope (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonMaxKey | Casts the BsonValue to a BsonMaxKey (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonMinKey | Casts the BsonValue to a BsonMinKey (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonNull | Casts the BsonValue to a BsonNull (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonRegularExpression | Casts the BsonValue to a BsonRegularExpression (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonSymbol | Casts the BsonValue to a BsonSymbol (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonTimestamp | Casts the BsonValue to a BsonTimestamp (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonUndefined | Casts the BsonValue to a BsonUndefined (throws an InvalidCastException if the cast is not valid). |
|
| AsBsonValue | Casts the BsonValue to a BsonValue (a way of upcasting subclasses of BsonValue to BsonValue at compile time). |
|
| AsByteArray | Casts the BsonValue to a Byte[] (throws an InvalidCastException if the cast is not valid). |
|
| AsDateTime | Obsolete. Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid). |
|
| AsDecimal | Casts the BsonValue to a Decimal (throws an InvalidCastException if the cast is not valid). |
|
| AsDecimal128 | Casts the BsonValue to a Decimal128 (throws an InvalidCastException if the cast is not valid). |
|
| AsDouble | Casts the BsonValue to a Double (throws an InvalidCastException if the cast is not valid). |
|
| AsGuid | Casts the BsonValue to a Guid (throws an InvalidCastException if the cast is not valid). |
|
| AsInt32 | Casts the BsonValue to an Int32 (throws an InvalidCastException if the cast is not valid). |
|
| AsInt64 | Casts the BsonValue to a Int64 (throws an InvalidCastException if the cast is not valid). |
|
| AsLocalTime | Obsolete. Casts the BsonValue to a DateTime in the local timezone (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableBoolean | Casts the BsonValue to a Nullable{Boolean} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableDateTime | Obsolete. Casts the BsonValue to a Nullable{DateTime} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableDecimal | Casts the BsonValue to a Nullable{Decimal} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableDecimal128 | Casts the BsonValue to a Nullable{Decimal128} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableDouble | Casts the BsonValue to a Nullable{Double} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableGuid | Casts the BsonValue to a Nullable{Guid} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableInt32 | Casts the BsonValue to a Nullable{Int32} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableInt64 | Casts the BsonValue to a Nullable{Int64} (throws an InvalidCastException if the cast is not valid). |
|
| AsNullableObjectId | Casts the BsonValue to a Nullable{ObjectId} (throws an InvalidCastException if the cast is not valid). |
|
| AsObjectId | Casts the BsonValue to an ObjectId (throws an InvalidCastException if the cast is not valid). |
|
| AsRegex | Casts the BsonValue to a Regex (throws an InvalidCastException if the cast is not valid). |
|
| AsString | Casts the BsonValue to a String (throws an InvalidCastException if the cast is not valid). |
|
| AsUniversalTime | Obsolete. Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid). |
|
| BsonType | Gets the BsonType of this BsonValue. |
|
| IsBoolean | Tests whether this BsonValue is a Boolean. |
|
| IsBsonArray | Tests whether this BsonValue is a BsonArray. |
|
| IsBsonBinaryData | Tests whether this BsonValue is a BsonBinaryData. |
|
| IsBsonDateTime | Tests whether this BsonValue is a BsonDateTime. |
|
| IsBsonDocument | Tests whether this BsonValue is a BsonDocument. |
|
| IsBsonJavaScript | Tests whether this BsonValue is a BsonJavaScript. |
|
| IsBsonJavaScriptWithScope | Tests whether this BsonValue is a BsonJavaScriptWithScope. |
|
| IsBsonMaxKey | Tests whether this BsonValue is a BsonMaxKey. |
|
| IsBsonMinKey | Tests whether this BsonValue is a BsonMinKey. |
|
| IsBsonNull | Tests whether this BsonValue is a BsonNull. |
|
| IsBsonRegularExpression | Tests whether this BsonValue is a BsonRegularExpression. |
|
| IsBsonSymbol | Tests whether this BsonValue is a BsonSymbol . |
|
| IsBsonTimestamp | Tests whether this BsonValue is a BsonTimestamp. |
|
| IsBsonUndefined | Tests whether this BsonValue is a BsonUndefined. |
|
| IsDateTime | Obsolete. Tests whether this BsonValue is a DateTime. |
|
| IsDecimal128 | Tests whether this BsonValue is a Decimal128. |
|
| IsDouble | Tests whether this BsonValue is a Double. |
|
| IsGuid | Tests whether this BsonValue is a Guid. |
|
| IsInt32 | Tests whether this BsonValue is an Int32. |
|
| IsInt64 | Tests whether this BsonValue is an Int64. |
|
| IsNumeric | Tests whether this BsonValue is a numeric value. |
|
| IsObjectId | Tests whether this BsonValue is an ObjectId . |
|
| IsString | Tests whether this BsonValue is a String. |
|
| IsValidDateTime | Tests whether this BsonValue is a valid DateTime. |
|
| ItemInt32 | Gets or sets a value by position (only applies to BsonDocument and BsonArray). |
|
| ItemString | Gets or sets a value by name (only applies to BsonDocument). |
|
| RawValue | Obsolete. Gets the raw value of this BsonValue (or null if this BsonValue doesn't have a single scalar value). |
Methods
Operators
Extension Methods
See Also
Reference
Inheritance Hierarchy