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 | | | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- | ------------------------------------------------- | | Protected method | BsonValue | Initializes a new instance of the BsonValue class |

Top

Properties

| | Name | Description | | | ---------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Public property | AsBoolean | Casts the BsonValue to a Boolean (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonArray | Casts the BsonValue to a BsonArray (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonBinaryData | Casts the BsonValue to a BsonBinaryData (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonDateTime | Casts the BsonValue to a BsonDateTime (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonDocument | Casts the BsonValue to a BsonDocument (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonJavaScript | Casts the BsonValue to a BsonJavaScript (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonJavaScriptWithScope | Casts the BsonValue to a BsonJavaScriptWithScope (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonMaxKey | Casts the BsonValue to a BsonMaxKey (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonMinKey | Casts the BsonValue to a BsonMinKey (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonNull | Casts the BsonValue to a BsonNull (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonRegularExpression | Casts the BsonValue to a BsonRegularExpression (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonSymbol | Casts the BsonValue to a BsonSymbol (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonTimestamp | Casts the BsonValue to a BsonTimestamp (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonUndefined | Casts the BsonValue to a BsonUndefined (throws an InvalidCastException if the cast is not valid). | | Public property | AsBsonValue | Casts the BsonValue to a BsonValue (a way of upcasting subclasses of BsonValue to BsonValue at compile time). | | Public property | AsByteArray | Casts the BsonValue to a Byte[] (throws an InvalidCastException if the cast is not valid). | | Public property | AsDateTime | Obsolete. Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid). | | Public property | AsDecimal | Casts the BsonValue to a Decimal (throws an InvalidCastException if the cast is not valid). | | Public property | AsDecimal128 | Casts the BsonValue to a Decimal128 (throws an InvalidCastException if the cast is not valid). | | Public property | AsDouble | Casts the BsonValue to a Double (throws an InvalidCastException if the cast is not valid). | | Public property | AsGuid | Casts the BsonValue to a Guid (throws an InvalidCastException if the cast is not valid). | | Public property | AsInt32 | Casts the BsonValue to an Int32 (throws an InvalidCastException if the cast is not valid). | | Public property | AsInt64 | Casts the BsonValue to a Int64 (throws an InvalidCastException if the cast is not valid). | | Public property | AsLocalTime | Obsolete. Casts the BsonValue to a DateTime in the local timezone (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableBoolean | Casts the BsonValue to a Nullable{Boolean} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableDateTime | Obsolete. Casts the BsonValue to a Nullable{DateTime} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableDecimal | Casts the BsonValue to a Nullable{Decimal} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableDecimal128 | Casts the BsonValue to a Nullable{Decimal128} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableDouble | Casts the BsonValue to a Nullable{Double} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableGuid | Casts the BsonValue to a Nullable{Guid} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableInt32 | Casts the BsonValue to a Nullable{Int32} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableInt64 | Casts the BsonValue to a Nullable{Int64} (throws an InvalidCastException if the cast is not valid). | | Public property | AsNullableObjectId | Casts the BsonValue to a Nullable{ObjectId} (throws an InvalidCastException if the cast is not valid). | | Public property | AsObjectId | Casts the BsonValue to an ObjectId (throws an InvalidCastException if the cast is not valid). | | Public property | AsRegex | Casts the BsonValue to a Regex (throws an InvalidCastException if the cast is not valid). | | Public property | AsString | Casts the BsonValue to a String (throws an InvalidCastException if the cast is not valid). | | Public property | AsUniversalTime | Obsolete. Casts the BsonValue to a DateTime in UTC (throws an InvalidCastException if the cast is not valid). | | Public property | BsonType | Gets the BsonType of this BsonValue. | | Public property | IsBoolean | Tests whether this BsonValue is a Boolean. | | Public property | IsBsonArray | Tests whether this BsonValue is a BsonArray. | | Public property | IsBsonBinaryData | Tests whether this BsonValue is a BsonBinaryData. | | Public property | IsBsonDateTime | Tests whether this BsonValue is a BsonDateTime. | | Public property | IsBsonDocument | Tests whether this BsonValue is a BsonDocument. | | Public property | IsBsonJavaScript | Tests whether this BsonValue is a BsonJavaScript. | | Public property | IsBsonJavaScriptWithScope | Tests whether this BsonValue is a BsonJavaScriptWithScope. | | Public property | IsBsonMaxKey | Tests whether this BsonValue is a BsonMaxKey. | | Public property | IsBsonMinKey | Tests whether this BsonValue is a BsonMinKey. | | Public property | IsBsonNull | Tests whether this BsonValue is a BsonNull. | | Public property | IsBsonRegularExpression | Tests whether this BsonValue is a BsonRegularExpression. | | Public property | IsBsonSymbol | Tests whether this BsonValue is a BsonSymbol . | | Public property | IsBsonTimestamp | Tests whether this BsonValue is a BsonTimestamp. | | Public property | IsBsonUndefined | Tests whether this BsonValue is a BsonUndefined. | | Public property | IsDateTime | Obsolete. Tests whether this BsonValue is a DateTime. | | Public property | IsDecimal128 | Tests whether this BsonValue is a Decimal128. | | Public property | IsDouble | Tests whether this BsonValue is a Double. | | Public property | IsGuid | Tests whether this BsonValue is a Guid. | | Public property | IsInt32 | Tests whether this BsonValue is an Int32. | | Public property | IsInt64 | Tests whether this BsonValue is an Int64. | | Public property | IsNumeric | Tests whether this BsonValue is a numeric value. | | Public property | IsObjectId | Tests whether this BsonValue is an ObjectId . | | Public property | IsString | Tests whether this BsonValue is a String. | | Public property | IsValidDateTime | Tests whether this BsonValue is a valid DateTime. | | Public property | ItemInt32 | Gets or sets a value by position (only applies to BsonDocument and BsonArray). | | Public property | ItemString | Gets or sets a value by name (only applies to BsonDocument). | | Public property | RawValue | Obsolete. Gets the raw value of this BsonValue (or null if this BsonValue doesn't have a single scalar value). |

Top

Methods

Operators

Extension Methods

See Also

Reference

Inheritance Hierarchy