Merge pull request #1898 from alexanderkyte/debugger_variable_reflection
[mono.git] / mcs / class / corlib / System.Reflection.Emit / TypeToken.cs
index 64af39fcedc54832ce24036bd7031f4eb5731913..9a8970e9cf1d7b60c9e46f8edaf02188d95fee25 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 {
@@ -34,21 +35,12 @@ namespace System.Reflection.Emit {
        ///  Represents the Token returned by the metadata to represent a Type.
        /// </summary>
        [Serializable]
-#if NET_2_0
        [ComVisible (true)]
-#endif
        public struct TypeToken {
 
                internal int tokValue;
 
-               public static readonly TypeToken Empty;
-
-
-               static TypeToken ()
-               {
-                       Empty = new TypeToken ();
-               }
-
+               public static readonly TypeToken Empty = new TypeToken ();
 
                internal TypeToken (int val)
                {
@@ -69,12 +61,20 @@ namespace System.Reflection.Emit {
                        return res;
                }
 
-#if NET_2_0
                public bool Equals (TypeToken obj)
                {
                        return (this.tokValue == obj.tokValue);
                }
-#endif
+
+               public static bool operator == (TypeToken a, TypeToken b)
+               {
+                       return Equals (a, b);
+               }
+
+               public static bool operator != (TypeToken a, TypeToken b)
+               {
+                       return !Equals (a, b);
+               }
 
                /// <summary>
                ///  Tests whether the given object is an instance of
@@ -99,3 +99,4 @@ namespace System.Reflection.Emit {
 
 }
 
+#endif