AscendingGuidGeneratorGenerateId Method (Int64, Byte, Int32) |
Generates a Guid for a document. Note - this is purely used for
unit testing
Namespace:
MongoDB.Bson.Serialization.IdGenerators
Assembly:
MongoDB.Bson (in MongoDB.Bson.dll) Version: 2.7.3+Branch.v2.7.x.Sha.2f1f2be13a23b8520cb9c2ee8439c022f9a03efe
Syntax public Object GenerateId(
long tickCount,
byte[] machineProcessId,
int increment
)
Public Function GenerateId (
tickCount As Long,
machineProcessId As Byte(),
increment As Integer
) As Object
member GenerateId :
tickCount : int64 *
machineProcessId : byte[] *
increment : int -> Object
Parameters
- tickCount
- Type: SystemInt64
The time portion of the Guid - machineProcessId
- Type: SystemByte
A 5 byte array with the first 3 bytes
representing a machine id and the next 2 representing a process
id - increment
- Type: SystemInt32
The increment portion of the Guid. Used
to distinguish between 2 Guids that have the timestamp. Note
only the least significant 3 bytes are used.
Return Value
Type:
ObjectA Guid.
See Also