projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #948 from ermshiperete/bug-xamarin-2394
[mono.git]
/
mcs
/
class
/
corlib
/
System.Reflection.Emit
/
PropertyToken.cs
diff --git
a/mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
b/mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
index c6354bfed2b5650050c6bfd8340bd1c1c5f94944..e1f2c846965167f1cb4c3028d00b1040977df0ce 100644
(file)
--- a/
mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
+++ b/
mcs/class/corlib/System.Reflection.Emit/PropertyToken.cs
@@
-25,6
+25,7
@@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+#if !FULL_AOT_RUNTIME
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
using System.Runtime.InteropServices;
namespace System.Reflection.Emit {
@@
-33,22
+34,13
@@
namespace System.Reflection.Emit {
/// <summary>
/// Represents the Token returned by the metadata to represent a Property.
/// </summary>
/// <summary>
/// Represents the Token returned by the metadata to represent a Property.
/// </summary>
-#if NET_2_0
[ComVisible (true)]
[ComVisible (true)]
-#endif
[Serializable]
public struct PropertyToken {
internal int tokValue;
[Serializable]
public struct PropertyToken {
internal int tokValue;
- public static readonly PropertyToken Empty;
-
-
- static PropertyToken ()
- {
- Empty = new PropertyToken ();
- }
-
+ public static readonly PropertyToken Empty = new PropertyToken ();
internal PropertyToken (int val)
{
internal PropertyToken (int val)
{
@@
-69,12
+61,20
@@
namespace System.Reflection.Emit {
return res;
}
return res;
}
-#if NET_2_0
public bool Equals (PropertyToken obj)
{
return (this.tokValue == obj.tokValue);
}
public bool Equals (PropertyToken obj)
{
return (this.tokValue == obj.tokValue);
}
-#endif
+
+ public static bool operator == (PropertyToken a, PropertyToken b)
+ {
+ return Equals (a, b);
+ }
+
+ public static bool operator != (PropertyToken a, PropertyToken b)
+ {
+ return !Equals (a, b);
+ }
/// <summary>
/// Tests whether the given object is an instance of
/// <summary>
/// Tests whether the given object is an instance of
@@
-99,3
+99,4
@@
namespace System.Reflection.Emit {
}
}
+#endif