Welcome to mirror list, hosted at ThFree Co, Russian Federation.

SignatureToken.cs « System.Reflection.Emit « corlib « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b8e7aa67bb59272cb695fc4baedf03972c81871d (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
66
67
68
69
70
// SignatureToken.cs
//
// (C) 2001 Ximian, Inc.  http://www.ximian.com


namespace System.Reflection.Emit {


	/// <summary>
	///  Represents the Token returned by the metadata to represent a Signature.
	/// </summary>
	[Serializable]
	public struct SignatureToken {

		internal int tokValue;

		public static readonly SignatureToken Empty;


		static SignatureToken ()
		{
			Empty = new SignatureToken ();
		}


		internal SignatureToken (int val)
		{
			tokValue = val;
		}



		/// <summary>
		/// </summary>
		public override bool Equals (object obj)
		{
			bool res = obj is SignatureToken;

			if (res) {
				SignatureToken that = (SignatureToken) obj;
				res = (this.tokValue == that.tokValue);
			}

			return res;
		}


		/// <summary>
		///  Tests whether the given object is an instance of
		///  SignatureToken and has the same token value.
		/// </summary>
		public override int GetHashCode ()
		{
			return tokValue;
		}


		/// <summary>
		///  Returns the metadata token for this Signature.
		/// </summary>
		public int Token {
			get {
				return tokValue;
			}
		}

	}

}