Pip-Services-Commons-Dotnet
|
Helper class to generate unique object IDs. It supports two types of IDs: long and short. More...
Static Public Member Functions | |
static string | NextShort () |
Generates a random 9-digit random ID (code). More... | |
static string | NextLong () |
Generates a globally unique 32-digit object ID. The value is a string representation of a GUID value. More... | |
Static Private Attributes | |
static readonly System.Random | _random = new System.Random() |
Helper class to generate unique object IDs. It supports two types of IDs: long and short.
Long IDs are string GUIDs.They are globally unique and 32-character long.
ShortIDs are just 9-digit random numbers.They are not guaranteed be unique.
|
static |
Generates a globally unique 32-digit object ID. The value is a string representation of a GUID value.
|
static |
Generates a random 9-digit random ID (code).
Remember: The returned value is not guaranteed to be unique.