Constructor BsonObjectId
BsonObjectId(ObjectId)
Initializes a new instance of the BsonObjectId class.
public BsonObjectId(ObjectId value)
Parameters
valueObjectIdThe value.
BsonObjectId(byte[])
Initializes a new instance of the BsonObjectId class.
[Obsolete("Use new BsonObjectId(ObjectId value) instead.")]
public BsonObjectId(byte[] bytes)
Parameters
bytesbyte[]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
timestampDateTimeThe timestamp (expressed as a DateTime).
machineintThe machine hash.
pidshortThe PID.
incrementintThe 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
timestampintThe timestamp.
machineintThe machine hash.
pidshortThe PID.
incrementintThe 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
valuestringThe value.