diff options
Diffstat (limited to 'Assembly_Firstpass/Steamworks/SiteId_t.cs')
-rw-r--r-- | Assembly_Firstpass/Steamworks/SiteId_t.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Assembly_Firstpass/Steamworks/SiteId_t.cs b/Assembly_Firstpass/Steamworks/SiteId_t.cs new file mode 100644 index 0000000..069b5e3 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/SiteId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct SiteId_t : IEquatable<SiteId_t>, IComparable<SiteId_t> +{ + public static readonly SiteId_t Invalid = new SiteId_t(0uL); + + public ulong m_SiteId; + + public SiteId_t(ulong value) + { + m_SiteId = value; + } + + public override string ToString() + { + return m_SiteId.ToString(); + } + + public override bool Equals(object other) + { + if (other is SiteId_t) + { + return this == (SiteId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_SiteId.GetHashCode(); + } + + public static bool operator ==(SiteId_t x, SiteId_t y) + { + return x.m_SiteId == y.m_SiteId; + } + + public static bool operator !=(SiteId_t x, SiteId_t y) + { + return !(x == y); + } + + public static explicit operator SiteId_t(ulong value) + { + return new SiteId_t(value); + } + + public static explicit operator ulong(SiteId_t that) + { + return that.m_SiteId; + } + + public bool Equals(SiteId_t other) + { + return m_SiteId == other.m_SiteId; + } + + public int CompareTo(SiteId_t other) + { + return m_SiteId.CompareTo(other.m_SiteId); + } +} |