Fix null sessions in HttpContextWrapper.Session
[mono.git] / mcs / class / corlib / System.Reflection.Emit / EventToken.cs
index b0d1b1706ec0648d98df24b95efa2cf2efd69d25..6d04142bc52297ef01038a4d55a98949c64c8d98 100644 (file)
@@ -33,22 +33,13 @@ namespace System.Reflection.Emit {
        /// <summary>
        ///  Represents the Token returned by the metadata to represent a Event.
        /// </summary>
-#if NET_2_0
        [ComVisible (true)]
-#endif
        [Serializable]
        public struct EventToken {
 
                internal int tokValue;
 
-               public static readonly EventToken Empty;
-
-
-               static EventToken ()
-               {
-                       Empty = new EventToken ();
-               }
-
+               public static readonly EventToken Empty = new EventToken ();
 
                internal EventToken (int val)
                {
@@ -71,12 +62,20 @@ namespace System.Reflection.Emit {
                        return res;
                }
 
-#if NET_2_0
                public bool Equals (EventToken obj)
                {
                        return (this.tokValue == obj.tokValue);
                }
-#endif
+
+               public static bool operator == (EventToken a, EventToken b)
+               {
+                       return Equals (a, b);
+               }
+
+               public static bool operator != (EventToken a, EventToken b)
+               {
+                       return !Equals (a, b);
+               }
 
                /// <summary>
                ///  Tests whether the given object is an instance of