punish v6.8.18.0
This commit is contained in:
commit
cfb4dea47e
316 changed files with 554088 additions and 0 deletions
|
@ -0,0 +1,77 @@
|
|||
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)
|
||||
{
|
||||
if ((object)this == other)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if ((object)other == null)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
return Value.CompareTo(other.Value);
|
||||
}
|
||||
|
||||
public bool Equals(GatheringPointId? other)
|
||||
{
|
||||
if ((object)other == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if ((object)this == other)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return Value == other.Value;
|
||||
}
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (this == obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (obj.GetType() != GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return Equals((GatheringPointId)obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Value.GetHashCode();
|
||||
}
|
||||
|
||||
public static bool operator ==(GatheringPointId? left, GatheringPointId? right)
|
||||
{
|
||||
return object.Equals(left, right);
|
||||
}
|
||||
|
||||
public static bool operator !=(GatheringPointId? left, GatheringPointId? right)
|
||||
{
|
||||
return !object.Equals(left, right);
|
||||
}
|
||||
|
||||
public static GatheringPointId FromString(string value)
|
||||
{
|
||||
return new GatheringPointId(ushort.Parse(value, CultureInfo.InvariantCulture));
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue