blob: b3f5a5dade179e342625a821da5ecb48e5a42c91 (
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
|
// FieldToken.cs
//
// (C) 2001 Ximian, Inc. http://www.ximian.com
namespace System.Reflection.Emit {
/// <summary>
/// Represents the Token returned by the metadata to represent a Field.
/// </summary>
[Serializable]
public struct FieldToken {
internal int tokValue;
public static readonly FieldToken Empty;
static FieldToken ()
{
Empty = new FieldToken ();
}
internal FieldToken (int val)
{
tokValue = val;
}
/// <summary>
/// </summary>
public override bool Equals (object obj)
{
bool res = obj is FieldToken;
if (res) {
FieldToken that = (FieldToken) obj;
res = (this.tokValue == that.tokValue);
}
return res;
}
/// <summary>
/// Tests whether the given object is an instance of
/// FieldToken and has the same token value.
/// </summary>
public override int GetHashCode ()
{
return tokValue;
}
/// <summary>
/// Returns the metadata token for this Field.
/// </summary>
public int Token {
get {
return tokValue;
}
}
}
}
|