Skip to main content
Version: 0.9.0

OnboardingId struct

The key of an identity slot, minted by the first Runtime.Onboard. It is the one thing an application persists: hand it back to Runtime.Rejoin on every start and to Runtime.Forget to unpair.

Namespace: Quaternar.Qaros · Assembly: Quaternar.Qaros.dll · Source: OnboardingTypes.cs

public readonly struct OnboardingId : IEquatable<OnboardingId>

Implements: IEquatable<OnboardingId>

Remarks​

Store it as text: OnboardingId.ToString writes the UUID string OnboardingId.Parse reads. Equality is by byte content.

Properties​

Default​

The all-zero id, meaning "no id". Rejoin and forget reject it.

public static OnboardingId Default { get; }

Value: OnboardingId

Methods​

MemberDescription
Parse(string)
TryParse(string, out OnboardingId)
ToByteArray()
AsSpan()
TryCopyTo(Span<byte>)
ToString()Returns the fully qualified type name of this instance.
Equals(OnboardingId)Indicates whether the current object is equal to another object of the same type.
Equals(object?)Indicates whether this instance and a specified object are equal.
GetHashCode()Returns the hash code for this instance.

Parse​

public static OnboardingId Parse(string text)

Parameters

NameTypeDescription
textstring

Returns: OnboardingId

TryParse​

public static bool TryParse(string text, out OnboardingId id)

Parameters

NameTypeDescription
textstring
idOnboardingId

Returns: bool

ToByteArray​

public byte[] ToByteArray()

Returns: byte[]

AsSpan​

public ReadOnlySpan<byte> AsSpan()

Returns: ReadOnlySpan<byte>

TryCopyTo​

public bool TryCopyTo(Span<byte> destination)

Parameters

NameTypeDescription
destinationSpan<byte>

Returns: bool

ToString​

Returns the fully qualified type name of this instance.

public override string ToString()

Returns: string — The fully qualified type name.

Equals(OnboardingId)​

Indicates whether the current object is equal to another object of the same type.

public bool Equals(OnboardingId other)

Parameters

NameTypeDescription
otherOnboardingIdAn object to compare with this object.

Returns: bool — true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)​

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

NameTypeDescription
objobjectThe object to compare with the current instance.

Returns: bool — true if obj and this instance are the same type and represent the same value; otherwise, false.

GetHashCode​

Returns the hash code for this instance.

public override int GetHashCode()

Returns: int — A 32-bit signed integer that is the hash code for this instance.

Operators​

operator ==​

public static bool operator ==(OnboardingId left, OnboardingId right)

Parameters

NameTypeDescription
leftOnboardingId
rightOnboardingId

Returns: bool

operator !=​

public static bool operator !=(OnboardingId left, OnboardingId right)

Parameters

NameTypeDescription
leftOnboardingId
rightOnboardingId

Returns: bool