Constructor BsonObjectId
BsonObjectId(ObjectId)
Initializes a new instance of the BsonObjectId class.
public BsonObjectId(ObjectId value)
Parameters
value
ObjectIdThe value.
BsonObjectId(byte[])
Initializes a new instance of the BsonObjectId class.
[Obsolete("Use new BsonObjectId(ObjectId value) instead.")]
public BsonObjectId(byte[] bytes)
Parameters
bytes
byte[]The bytes.
BsonObjectId(DateTime, int, short, int)
Initializes a new instance of the BsonObjectId class.
[Obsolete("Use new BsonObjectId(new ObjectId(DateTime timestamp, int machine, short pid, int increment)) instead.")]
public BsonObjectId(DateTime timestamp, int machine, short pid, int increment)
Parameters
timestamp
DateTimeThe timestamp (expressed as a DateTime).
machine
intThe machine hash.
pid
shortThe PID.
increment
intThe increment.
BsonObjectId(int, int, short, int)
Initializes a new instance of the BsonObjectId class.
[Obsolete("Use new BsonObjectId(new ObjectId(int timestamp, int machine, short pid, int increment)) instead.")]
public BsonObjectId(int timestamp, int machine, short pid, int increment)
Parameters
timestamp
intThe timestamp.
machine
intThe machine hash.
pid
shortThe PID.
increment
intThe increment.
BsonObjectId(string)
Initializes a new instance of the BsonObjectId class.
[Obsolete("Use new BsonObjectId(new ObjectId(string value)) instead.")]
public BsonObjectId(string value)
Parameters
value
stringThe value.