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
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
| Member | Description |
|---|---|
| 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
| Name | Type | Description |
|---|---|---|
text | string |
Returns: OnboardingId
TryParse
public static bool TryParse(string text, out OnboardingId id)
Parameters
| Name | Type | Description |
|---|---|---|
text | string | |
id | OnboardingId |
Returns: bool
ToByteArray
public byte[] ToByteArray()
Returns: byte[]
AsSpan
public ReadOnlySpan<byte> AsSpan()
Returns: ReadOnlySpan<byte>
TryCopyTo
public bool TryCopyTo(Span<byte> destination)
Parameters
| Name | Type | Description |
|---|---|---|
destination | Span<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
| Name | Type | Description |
|---|---|---|
other | OnboardingId | An 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
| Name | Type | Description |
|---|---|---|
obj | object | The 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
| Name | Type | Description |
|---|---|---|
left | OnboardingId | |
right | OnboardingId |
Returns: bool
operator !=
public static bool operator !=(OnboardingId left, OnboardingId right)
Parameters
| Name | Type | Description |
|---|---|---|
left | OnboardingId | |
right | OnboardingId |
Returns: bool