blob: a12e442aa6c56951bce60dba4a22eb98cf4fc304 (
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
71
|
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: EventToken
**
** <OWNER>[....]</OWNER>
**
**
** Propertybuilder is for client to define properties for a class
**
**
===========================================================*/
namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security.Permissions;
[Serializable]
[System.Runtime.InteropServices.ComVisible(true)]
public struct EventToken
{
public static readonly EventToken Empty = new EventToken();
internal int m_event;
internal EventToken(int str) {
m_event=str;
}
public int Token {
get { return m_event; }
}
public override int GetHashCode()
{
return m_event;
}
public override bool Equals(Object obj)
{
if (obj is EventToken)
return Equals((EventToken)obj);
else
return false;
}
public bool Equals(EventToken obj)
{
return obj.m_event == m_event;
}
public static bool operator ==(EventToken a, EventToken b)
{
return a.Equals(b);
}
public static bool operator !=(EventToken a, EventToken b)
{
return !(a == b);
}
}
}
|