[sre] Fix the signature of the create_dynamic_method () icall, make it static since...
[mono.git] / mcs / class / corlib / System.Reflection.Emit / ParameterToken.cs
index fcd7344bc6cfa88a768f19fac154a57ac9a64d6e..9c42bb136f8a38334ee0104bba32edb067df01a5 100644 (file)
@@ -25,6 +25,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !FULL_AOT_RUNTIME
 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 Parameter.
        /// </summary>
-#if NET_2_0
        [ComVisible (true)]
-#endif
        [Serializable]
        public struct ParameterToken {
 
                internal int tokValue;
 
-               public static readonly ParameterToken Empty;
-
-
-               static ParameterToken ()
-               {
-                       Empty = new ParameterToken ();
-               }
-
+               public static readonly ParameterToken Empty = new ParameterToken ();
 
                internal ParameterToken (int val)
                {
@@ -69,12 +61,20 @@ namespace System.Reflection.Emit {
                        return res;
                }
 
-#if NET_2_0
                public bool Equals (ParameterToken obj)
                {
                        return (this.tokValue == obj.tokValue);
                }
-#endif
+
+               public static bool operator == (ParameterToken a, ParameterToken b)
+               {
+                       return Equals (a, b);
+               }
+
+               public static bool operator != (ParameterToken a, ParameterToken b)
+               {
+                       return !Equals (a, b);
+               }
 
                /// <summary>
                ///  Tests whether the given object is an instance of
@@ -99,3 +99,4 @@ namespace System.Reflection.Emit {
 
 }
 
+#endif