projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[corlib] Disable a test that is incompatible with how nunitlite runs tests
[mono.git]
/
mcs
/
class
/
corlib
/
System.Reflection.Emit
/
OpCode.cs
diff --git
a/mcs/class/corlib/System.Reflection.Emit/OpCode.cs
b/mcs/class/corlib/System.Reflection.Emit/OpCode.cs
index a496505d04faf5cc79b775ab7c9d8a084928f37d..aa3453d20069185d4d7e8abaf1ed258b6aab6f10 100644
(file)
--- a/
mcs/class/corlib/System.Reflection.Emit/OpCode.cs
+++ b/
mcs/class/corlib/System.Reflection.Emit/OpCode.cs
@@
-26,16
+26,11
@@
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
//
-using System;
-using System.Reflection;
-using System.Reflection.Emit;
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
-#if NET_2_0
[ComVisible (true)]
[ComVisible (true)]
-#endif
public struct OpCode {
internal byte op1, op2;
public struct OpCode {
internal byte op1, op2;
@@
-63,7
+58,7
@@
namespace System.Reflection.Emit {
public override int GetHashCode ()
{
public override int GetHashCode ()
{
- return
Value
;
+ return
Name.GetHashCode ()
;
}
public override bool Equals (Object obj)
}
public override bool Equals (Object obj)
@@
-76,12
+71,10
@@
namespace System.Reflection.Emit {
return v.op1 == op1 && v.op2 == op2;
}
return v.op1 == op1 && v.op2 == op2;
}
-#if NET_2_0
public bool Equals (OpCode obj)
{
return obj.op1 == op1 && obj.op2 == op2;
}
public bool Equals (OpCode obj)
{
return obj.op1 == op1 && obj.op2 == op2;
}
-#endif
public override string ToString ()
{
public override string ToString ()
{
@@
-144,5
+137,15
@@
namespace System.Reflection.Emit {
}
}
}
}
}
}
+
+ public static bool operator == (OpCode a, OpCode b)
+ {
+ return a.op1 == b.op1 && a.op2 == b.op2;
+ }
+
+ public static bool operator != (OpCode a, OpCode b)
+ {
+ return a.op1 != b.op1 || a.op2 != b.op2;
+ }
}
}
}
}