Struct Uuid
Namespace: Void.Minecraft.Profiles
Assembly: Void.Minecraft.dll
[JsonConverter(typeof(UuidJsonConverter))]public struct Uuid : IComparable<Uuid>, IEquatable<Uuid>Implements
IComparable<Uuid>, IEquatable<Uuid>
Inherited Members
object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
StructExtensions.IsDefault<Uuid>(Uuid)
Constructors
Uuid(Guid)
public Uuid(Guid guid)Parameters
guid Guid
Properties
AsGuid
public readonly Guid AsGuid { get; }Property Value
Empty
public static Uuid Empty { get; }Property Value
Methods
CompareTo(Uuid)
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
public readonly int CompareTo(Uuid other)Parameters
other Uuid
An object to compare with this instance.
Returns
A value that indicates the relative order of the objects being compared. The return value has these meanings:
| Value | Meaning |
|---|---|
| Less than zero | This instance precedes other in the sort order. |
| Zero | This instance occurs in the same position in the sort order as other. |
| Greater than zero | This instance follows other in the sort order. |
Equals(Uuid)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(Uuid other)Parameters
other Uuid
An object to compare with this object.
Returns
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 readonly bool Equals(object? obj)Parameters
obj object?
The object to compare with the current instance.
Returns
true if obj and this instance are the same type and represent the same value; otherwise, false.
FromLongs(long, long)
public static Uuid FromLongs(long mostSig, long leastSig)Parameters
mostSig long
leastSig long
Returns
FromStringHash(string)
public static Uuid FromStringHash(string text)Parameters
text string
Returns
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()Returns
A 32-bit signed integer that is the hash code for this instance.
GetVariant()
public int GetVariant()Returns
GetVersion()
public int GetVersion()Returns
NewUuid()
public static Uuid NewUuid()Returns
Offline(string)
public static Uuid Offline(string name)Parameters
name string
Returns
Parse(string)
public static Uuid Parse(string text)Parameters
text string
Returns
Parse(params int[])
public static Uuid Parse(params int[] parts)Parameters
parts int[]
Returns
ToString()
Returns the fully qualified type name of this instance.
public override readonly string ToString()Returns
The fully qualified type name.
TryParse(string?, out Uuid)
public static bool TryParse(string? text, out Uuid uuid)Parameters
text string?
uuid Uuid
Returns
Operators
operator ==(Uuid, Uuid)
public static bool operator ==(Uuid left, Uuid right)Parameters
left Uuid
right Uuid
Returns
operator !=(Uuid, Uuid)
public static bool operator !=(Uuid left, Uuid right)Parameters
left Uuid
right Uuid