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 --- .../Steamworks/HSteamNetPollGroup.cs | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs (limited to 'Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs') diff --git a/Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs b/Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs new file mode 100644 index 0000000..9f03989 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HSteamNetPollGroup.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HSteamNetPollGroup : IEquatable, IComparable +{ + public static readonly HSteamNetPollGroup Invalid = new HSteamNetPollGroup(0u); + + public uint m_HSteamNetPollGroup; + + public HSteamNetPollGroup(uint value) + { + m_HSteamNetPollGroup = value; + } + + public override string ToString() + { + return m_HSteamNetPollGroup.ToString(); + } + + public override bool Equals(object other) + { + if (other is HSteamNetPollGroup) + { + return this == (HSteamNetPollGroup)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HSteamNetPollGroup.GetHashCode(); + } + + public static bool operator ==(HSteamNetPollGroup x, HSteamNetPollGroup y) + { + return x.m_HSteamNetPollGroup == y.m_HSteamNetPollGroup; + } + + public static bool operator !=(HSteamNetPollGroup x, HSteamNetPollGroup y) + { + return !(x == y); + } + + public static explicit operator HSteamNetPollGroup(uint value) + { + return new HSteamNetPollGroup(value); + } + + public static explicit operator uint(HSteamNetPollGroup that) + { + return that.m_HSteamNetPollGroup; + } + + public bool Equals(HSteamNetPollGroup other) + { + return m_HSteamNetPollGroup == other.m_HSteamNetPollGroup; + } + + public int CompareTo(HSteamNetPollGroup other) + { + return m_HSteamNetPollGroup.CompareTo(other.m_HSteamNetPollGroup); + } +} -- cgit v1.1-26-g67d0