From 0e63c4a2c6dec8dfa260501fb7d73750261ea7b7 Mon Sep 17 00:00:00 2001 From: chai <215380520@qq.com> Date: Sat, 25 Nov 2023 18:39:02 +0800 Subject: + init --- Assembly_Firstpass/Steamworks/AppId_t.cs | 65 ++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Assembly_Firstpass/Steamworks/AppId_t.cs (limited to 'Assembly_Firstpass/Steamworks/AppId_t.cs') diff --git a/Assembly_Firstpass/Steamworks/AppId_t.cs b/Assembly_Firstpass/Steamworks/AppId_t.cs new file mode 100644 index 0000000..c78e9f8 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/AppId_t.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct AppId_t : IEquatable, IComparable +{ + public static readonly AppId_t Invalid = new AppId_t(0u); + + public uint m_AppId; + + public AppId_t(uint value) + { + m_AppId = value; + } + + public override string ToString() + { + return m_AppId.ToString(); + } + + public override bool Equals(object other) + { + if (other is AppId_t) + { + return this == (AppId_t)other; + } + return false; + } + + public override int GetHashCode() + { + return m_AppId.GetHashCode(); + } + + public static bool operator ==(AppId_t x, AppId_t y) + { + return x.m_AppId == y.m_AppId; + } + + public static bool operator !=(AppId_t x, AppId_t y) + { + return !(x == y); + } + + public static explicit operator AppId_t(uint value) + { + return new AppId_t(value); + } + + public static explicit operator uint(AppId_t that) + { + return that.m_AppId; + } + + public bool Equals(AppId_t other) + { + return m_AppId == other.m_AppId; + } + + public int CompareTo(AppId_t other) + { + return m_AppId.CompareTo(other.m_AppId); + } +} -- cgit v1.1-26-g67d0