summaryrefslogtreecommitdiff
path: root/Assembly_Firstpass/Steamworks/SiteId_t.cs
blob: 069b5e31d89065d105a344c5e5f370dcf5b99163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
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);
	}
}