Class BsonSymbol
Represents a BSON symbol value.
public class BsonSymbol : BsonValue, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonSymbol>, IEquatable<BsonSymbol>
- Inheritance
-
BsonSymbol
- Implements
- Inherited Members
- Extension Methods
Properties
BsonType
Gets the BsonType of this BsonValue.
public override BsonType BsonType { get; }
Property Value
Name
Gets the name of the symbol.
public string Name { get; }
Property Value
Methods
CompareTo(BsonSymbol)
Compares this BsonSymbol to another BsonSymbol.
public int CompareTo(BsonSymbol other)
Parameters
otherBsonSymbolThe other BsonSymbol.
Returns
- int
A 32-bit signed integer that indicates whether this BsonSymbol is less than, equal to, or greather than the other.
CompareTo(BsonValue)
Compares the BsonSymbol to another BsonValue.
public override int CompareTo(BsonValue other)
Parameters
otherBsonValueThe other BsonValue.
Returns
- int
A 32-bit signed integer that indicates whether this BsonSymbol is less than, equal to, or greather than the other BsonValue.
Create(object)
Creates a new BsonSymbol.
public static BsonSymbol Create(object value)
Parameters
valueobjectAn object to be mapped to a BsonSymbol.
Returns
- BsonSymbol
A BsonSymbol or null.
Equals(BsonSymbol)
Compares this BsonSymbol to another BsonSymbol.
public bool Equals(BsonSymbol rhs)
Parameters
rhsBsonSymbolThe other BsonSymbol.
Returns
- bool
True if the two BsonSymbol values are equal.
Equals(object)
Compares this BsonSymbol to another object.
public override bool Equals(object obj)
Parameters
objobjectThe other object.
Returns
- bool
True if the other object is a BsonSymbol and equal to this one.
GetHashCode()
Gets the hash code.
public override int GetHashCode()
Returns
- int
The hash code.
ToString()
Returns a string representation of the value.
public override string ToString()
Returns
- string
A string representation of the value.
Operators
operator ==(BsonSymbol, BsonSymbol)
Compares two BsonSymbol values.
public static bool operator ==(BsonSymbol lhs, BsonSymbol rhs)
Parameters
lhsBsonSymbolThe first BsonSymbol.
rhsBsonSymbolThe other BsonSymbol.
Returns
- bool
True if the two BsonSymbol values are equal according to ==.
implicit operator BsonSymbol(string)
Converts a string to a BsonSymbol.
public static implicit operator BsonSymbol(string name)
Parameters
namestringA string.
Returns
- BsonSymbol
A BsonSymbol.
operator !=(BsonSymbol, BsonSymbol)
Compares two BsonSymbol values.
public static bool operator !=(BsonSymbol lhs, BsonSymbol rhs)
Parameters
lhsBsonSymbolThe first BsonSymbol.
rhsBsonSymbolThe other BsonSymbol.
Returns
- bool
True if the two BsonSymbol values are not equal according to ==.