Skip to content
HyperKit

Ulid

struct Services.Utils.Ulid

Represents a Universally Unique Lexicographically Sortable Identifier (ULID). Spec: https://github.com/ulid/spec

Member Description
static readonly Ulid Empty = new Ulid()
Ulid(ReadOnlySpan<byte> bytes)
static Ulid NewUlid()
static Ulid NewUlid(DateTimeOffset timestamp)
static Ulid Parse(string base32) Parse a base32 ULID string (26 chars) to a Ulid struct.
static Ulid Parse(ReadOnlySpan<char> base32)
long GetUnixTimeMilliseconds() Returns the 48-bit timestamp (ms since unix epoch)
DateTimeOffset Time
byte[] Randomness Returns the 10 random bytes.
byte[] ToByteArray()
override string ToString() Convert this ULID to its canonical 26-char base32 string.
bool Equals(Ulid other)
override bool Equals(object obj)
override int GetHashCode()
int CompareTo(Ulid other)
int CompareTo(object obj)
static bool operator ==(Ulid left, Ulid right)
static bool operator !=(Ulid left, Ulid right)
static bool operator <(Ulid left, Ulid right)
static bool operator >(Ulid left, Ulid right)
public static readonly Ulid Empty = new Ulid();
public Ulid(ReadOnlySpan<byte> bytes)
public static Ulid NewUlid()
public static Ulid NewUlid(DateTimeOffset timestamp)
public static Ulid Parse(string base32)

Parse a base32 ULID string (26 chars) to a Ulid struct.

public static Ulid Parse(ReadOnlySpan<char> base32)
public long GetUnixTimeMilliseconds()

Returns the 48-bit timestamp (ms since unix epoch)

public DateTimeOffset Time { get; }
public byte[] Randomness { get; }

Returns the 10 random bytes.

public byte[] ToByteArray()
public override string ToString()

Convert this ULID to its canonical 26-char base32 string.

public bool Equals(Ulid other)
public override bool Equals(object obj)
public override int GetHashCode()
public int CompareTo(Ulid other)
public int CompareTo(object obj)
public static bool operator ==(Ulid left, Ulid right)
public static bool operator !=(Ulid left, Ulid right)
public static bool operator <(Ulid left, Ulid right)
public static bool operator >(Ulid left, Ulid right)

Generated from the v1.5.14 source.