Table of Contents

HalfUlid Class

Namespace
SatorImaging.HUlid
public static class HalfUlid

Half-ULID (HUlid) is a 64-bit (long) shrinked version of ULID. Max 2,097,152 of IDs can be created for every milliseconds.

Inheritance
HalfUlid

Fields

DEFAULT_START_VALUE
DEFAULT_YEAR_ORIGIN
ID_MAX
MinValue
RANDOM_ID_BITMASK
RANDOM_ID_MAX
RANDOM_ID_SEQ_BIT_LENGTH
YEAR_MAX
YEAR_USE_CURRENT

Properties

CurrentOriginYear

Methods

GetDateTime(long, int)
GetRandomBits(long)
GetTimeBits(DateTime)
GetValue(long)
GetValueWithoutRandomBits(long)
Init()

Initialize with default or current start value and last or default origin year.

Init(int, int)
Next(int)

Generate sequential Half-ULID value.

Random()

Generate Half-ULID using random number and sequential value.

SetCreationTime(DateTime)
ToHUlidDateTime(long, int)
ToHUlidValue(long)
TryGetDateTime(long, out DateTime, int)
TryGetRandomBits(long, out int)
TryGetValue(long, out int)
TryGetValueWithoutRandomBits(long, out int)