Class Ids
The one id generator (openspec item-identity, One Id Generator per Language): UUID
version 7 for record, event and correlation ids, version 4 for tokens, version 5 for
ids that must be derived the same way every time. Python (new_id,
new_token, derived_id) and TypeScript (newId, newToken,
derivedId) have the same three. Nothing orders by id: timestamps stay the source
of truth for time. Where an id goes into a string, use ToString(),
the lower-case hyphenated form every language writes.
public static class Ids
- Inheritance
-
Ids
- Inherited Members
Methods
DerivedId(Guid, string)
The id derived from name in ns: a UUID of
version 5 over the namespace and the UTF-8 bytes of the name (RFC 9562), the same in
every language and every run.
public static Guid DerivedId(Guid ns, string name)
Parameters
Returns
NewId()
A new record, event or correlation id: a UUID of version 7 (time-ordered).
public static Guid NewId()
Returns
NewToken()
A new token (a lease token, a nonce): a UUID of version 4, all random.
public static Guid NewToken()