Class BsonObjectId
Represents a BSON ObjectId value (see also ObjectId).
[Serializable]
public class BsonObjectId : BsonValue, IComparable<BsonValue>, IConvertible, IEquatable<BsonValue>, IComparable<BsonObjectId>, IEquatable<BsonObjectId>
- Inheritance
-
Bson
Object Id
- Implements
- Inherited Members
- Extension Methods
Constructors
- Bson
Object Id(Object Id) Initializes a new instance of the BsonObjectId class.
- Bson
Object Id(byte[]) Initializes a new instance of the BsonObjectId class.
- Bson
Object Id(Date Time, int, short, int) Initializes a new instance of the BsonObjectId class.
- Bson
Object Id(int, int, short, int) Initializes a new instance of the BsonObjectId class.
- Bson
Object Id(string) Initializes a new instance of the BsonObjectId class.
Properties
- Bson
Type Gets the BsonType of this BsonValue.
- Creation
Time Gets the creation time (derived from the timestamp).
- Empty
Gets an instance of BsonObjectId where the value is empty.
- Increment
Gets the increment.
- Machine
Gets the machine.
- Pid
Gets the PID.
- Raw
Value Gets the BsonObjectId as an ObjectId.
- Timestamp
Gets the timestamp.
- Value
Gets the value of this BsonObjectId.
Methods
- Compare
To(Bson Object Id) Compares this BsonObjectId to another BsonObjectId.
- Compare
To(Bson Value) Compares the BsonObjectId to another BsonValue.
- Create(object)
Creates a new BsonObjectId.
- Equals(Bson
Object Id) Compares this BsonObjectId to another BsonObjectId.
- Equals(object)
Compares this BsonObjectId to another object.
- Generate
New Id() Generates a new BsonObjectId with a unique value.
- Generate
New Id(Date Time) Generates a new BsonObjectId with a unique value (with the timestamp component based on a given DateTime).
- Generate
New Id(int) Generates a new BsonObjectId with a unique value (with the given timestamp).
- Get
Hash Code() Gets the hash code.
- IConvertible
ToString Implementation(IFormat Provider) Implementation of the IConvertible ToString method.
- Parse(string)
Parses a string and creates a new BsonObjectId.
- To
Byte Array() Converts the BsonObjectId to a byte array.
- To
String() Returns a string representation of the value.
- Try
Parse(string, out Bson Object Id) Tries to parse a string and create a new BsonObjectId.
Operators
- operator ==(Bson
Object Id, Bson Object Id) Compares two BsonObjectId values.
- implicit operator Bson
Object Id(Object Id) Converts an ObjectId to a BsonObjectId.
- operator !=(Bson
Object Id, Bson Object Id) Compares two BsonObjectId values.