qstbak/Questionable.Model/Questionable.Model.Gathering/GatheringPointId.cs
2026-08-17 20:27:25 +10:00

154 lines
5.2 KiB
C#

using System;
using System.Globalization;
namespace Questionable.Model.Gathering;
public class GatheringPointId : IComparable<GatheringPointId>, IEquatable<GatheringPointId>
{
public ushort Value { get; }
public GatheringPointId(ushort value)
{
Value = value;
}
public int CompareTo(GatheringPointId? other)
{
int num = (((object)this != other) ? (-1930487850) : (-1930487851));
while (true)
{
int num2 = num;
int num3 = -1930487852;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 4:
return Value.CompareTo(other.Value);
case 1:
return 0;
case 0:
num = -1930487851;
break;
case 3:
return 1;
case 2:
num = (((object)other != null) ? (-1930487856) : (-1930487849));
break;
}
}
}
int IComparable<GatheringPointId>.CompareTo(GatheringPointId? other)
{
//ILSpy generated this explicit interface implementation from .override directive in CompareTo
return this.CompareTo(other);
}
public bool Equals(GatheringPointId? other)
{
int num = (((object)other != null) ? 1984551825 : 1984551830);
while (true)
{
int num2 = num;
int num3 = 1984551829;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 0:
return Value == other.Value;
case 3:
return false;
case 2:
num = 1984551830;
break;
case 1:
return true;
case 4:
num = (((object)this != other) ? 1984551829 : 1984551828);
break;
}
}
}
bool IEquatable<GatheringPointId>.Equals(GatheringPointId? other)
{
//ILSpy generated this explicit interface implementation from .override directive in Equals
return this.Equals(other);
}
public override bool Equals(object? obj)
{
int num = ((obj != null) ? 1644524089 : 1644524094);
while (true)
{
int num2 = num;
int num3 = 1644524093;
int num4 = num2;
switch ((num4 | num3) - (num4 & num3))
{
case 6:
num = 1644524094;
break;
case 4:
num = ((this != obj) ? 1644524092 : 1644524095);
break;
case 1:
num = ((!_202B_206C_206D_200E_200B_206A_202E_200B_202E_206A_200C_202E_202D_202C_206E_202C_202E_206C_200C_202B_202D_206D_202C_206C_200E_206C_202B_202B_200C_202B_206A_206A_200F_200B_206F_206D_200C_202B_200F_200F_202E(_202C_202E_206C_206D_200C_206E_206F_200E_206F_200C_206F_202B_206F_206E_202D_206F_200B_202D_200D_200B_200F_202B_202D_202A_206D_206D_202B_206C_202C_202B_202B_200F_206D_200D_200F_202C_206C_206D_206E_200E_202E(obj), _202E_200B_200D_202C_202D_200D_200C_200E_200B_200C_206D_200E_202D_206F_206E_200E_200B_206E_206E_202B_206B_202D_200F_206C_202C_202B_202E_202A_200D_200B_206A_206D_200F_202C_206D_202D_200C_200D_206C_200D_202E((object?)this))) ? 1644524093 : 1644524088);
break;
case 3:
return false;
case 5:
return false;
case 2:
return true;
case 0:
return Equals((GatheringPointId)obj);
}
}
}
public override int GetHashCode()
{
return Value.GetHashCode();
}
public static bool operator ==(GatheringPointId? left, GatheringPointId? right)
{
return _202B_206E_206E_202A_206C_202E_202D_206F_202E_206A_206A_200B_206D_200C_206A_206E_202E_202D_202B_206D_202A_200B_206B_206B_206F_206D_200F_206D_202C_206D_202B_202E_206E_200C_206F_206B_200D_202E_206E_200E_202E((object?)left, (object?)right);
}
public static bool operator !=(GatheringPointId? left, GatheringPointId? right)
{
return !_202B_206E_206E_202A_206C_202E_202D_206F_202E_206A_206A_200B_206D_200C_206A_206E_202E_202D_202B_206D_202A_200B_206B_206B_206F_206D_200F_206D_202C_206D_202B_202E_206E_200C_206F_206B_200D_202E_206E_200E_202E((object?)left, (object?)right);
}
public static GatheringPointId FromString(string value)
{
return new GatheringPointId(ushort.Parse(value, _200D_202B_200F_206C_206F_200C_200B_206E_202E_200C_206C_202C_206D_206A_202B_202D_202C_200C_200D_200C_206A_200D_202B_200F_206C_206B_206A_206C_202D_206A_202C_200B_200D_206E_202C_200E_206D_200F_206F_202C_202E()));
}
static Type? _202C_202E_206C_206D_200C_206E_206F_200E_206F_200C_206F_202B_206F_206E_202D_206F_200B_202D_200D_200B_200F_202B_202D_202A_206D_206D_202B_206C_202C_202B_202B_200F_206D_200D_200F_202C_206C_206D_206E_200E_202E(object? P_0)
{
return P_0.GetType();
}
static Type? _202E_200B_200D_202C_202D_200D_200C_200E_200B_200C_206D_200E_202D_206F_206E_200E_200B_206E_206E_202B_206B_202D_200F_206C_202C_202B_202E_202A_200D_200B_206A_206D_200F_202C_206D_202D_200C_200D_206C_200D_202E(object? P_0)
{
return P_0.GetType();
}
static bool _202B_206C_206D_200E_200B_206A_202E_200B_202E_206A_200C_202E_202D_202C_206E_202C_202E_206C_200C_202B_202D_206D_202C_206C_200E_206C_202B_202B_200C_202B_206A_206A_200F_200B_206F_206D_200C_202B_200F_200F_202E(Type? P_0, Type? P_1)
{
return P_0 != P_1;
}
static bool _202B_206E_206E_202A_206C_202E_202D_206F_202E_206A_206A_200B_206D_200C_206A_206E_202E_202D_202B_206D_202A_200B_206B_206B_206F_206D_200F_206D_202C_206D_202B_202E_206E_200C_206F_206B_200D_202E_206E_200E_202E(object? P_0, object? P_1)
{
return object.Equals(P_0, P_1);
}
static CultureInfo? _200D_202B_200F_206C_206F_200C_200B_206E_202E_200C_206C_202C_206D_206A_202B_202D_202C_200C_200D_200C_206A_200D_202B_200F_206C_206B_206A_206C_202D_206A_202C_200B_200D_206E_202C_200E_206D_200F_206F_202C_202E()
{
return CultureInfo.InvariantCulture;
}
}