2020-06-29 21:51:12 +00:00
|
|
|
|
namespace PluralKit.Core
|
|
|
|
|
{
|
|
|
|
|
public readonly struct GroupId: INumericId<GroupId, int>
|
|
|
|
|
{
|
|
|
|
|
public int Value { get; }
|
|
|
|
|
|
|
|
|
|
public GroupId(int value)
|
|
|
|
|
{
|
|
|
|
|
Value = value;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Equals(GroupId other) => Value == other.Value;
|
|
|
|
|
|
|
|
|
|
public override bool Equals(object obj) => obj is GroupId other && Equals(other);
|
|
|
|
|
|
|
|
|
|
public override int GetHashCode() => Value;
|
|
|
|
|
|
|
|
|
|
public static bool operator ==(GroupId left, GroupId right) => left.Equals(right);
|
|
|
|
|
|
|
|
|
|
public static bool operator !=(GroupId left, GroupId right) => !left.Equals(right);
|
|
|
|
|
|
|
|
|
|
public int CompareTo(GroupId other) => Value.CompareTo(other.Value);
|
|
|
|
|
|
2020-08-27 19:28:36 +00:00
|
|
|
|
public override string ToString() => $"Group #{Value}";
|
2020-06-29 21:51:12 +00:00
|
|
|
|
}
|
|
|
|
|
}
|