diff options
author | chai <215380520@qq.com> | 2023-11-25 18:39:02 +0800 |
---|---|---|
committer | chai <215380520@qq.com> | 2023-11-25 18:39:02 +0800 |
commit | 0e63c4a2c6dec8dfa260501fb7d73750261ea7b7 (patch) | |
tree | f6f2291be65d195d6082b523a56183c332715240 /Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs |
+ init
Diffstat (limited to 'Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs')
-rw-r--r-- | Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs b/Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs new file mode 100644 index 0000000..32d0f91 --- /dev/null +++ b/Assembly_Firstpass/Steamworks/HTTPCookieContainerHandle.cs @@ -0,0 +1,65 @@ +using System; + +namespace Steamworks; + +[Serializable] +public struct HTTPCookieContainerHandle : IEquatable<HTTPCookieContainerHandle>, IComparable<HTTPCookieContainerHandle> +{ + public static readonly HTTPCookieContainerHandle Invalid = new HTTPCookieContainerHandle(0u); + + public uint m_HTTPCookieContainerHandle; + + public HTTPCookieContainerHandle(uint value) + { + m_HTTPCookieContainerHandle = value; + } + + public override string ToString() + { + return m_HTTPCookieContainerHandle.ToString(); + } + + public override bool Equals(object other) + { + if (other is HTTPCookieContainerHandle) + { + return this == (HTTPCookieContainerHandle)other; + } + return false; + } + + public override int GetHashCode() + { + return m_HTTPCookieContainerHandle.GetHashCode(); + } + + public static bool operator ==(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y) + { + return x.m_HTTPCookieContainerHandle == y.m_HTTPCookieContainerHandle; + } + + public static bool operator !=(HTTPCookieContainerHandle x, HTTPCookieContainerHandle y) + { + return !(x == y); + } + + public static explicit operator HTTPCookieContainerHandle(uint value) + { + return new HTTPCookieContainerHandle(value); + } + + public static explicit operator uint(HTTPCookieContainerHandle that) + { + return that.m_HTTPCookieContainerHandle; + } + + public bool Equals(HTTPCookieContainerHandle other) + { + return m_HTTPCookieContainerHandle == other.m_HTTPCookieContainerHandle; + } + + public int CompareTo(HTTPCookieContainerHandle other) + { + return m_HTTPCookieContainerHandle.CompareTo(other.m_HTTPCookieContainerHandle); + } +} |