2010-03-07 Rodrigo Kumpera <rkumpera@novell.com>
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 8 Mar 2010 04:30:59 +0000 (04:30 -0000)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 8 Mar 2010 04:30:59 +0000 (04:30 -0000)
* MethodInfo.cs: New v4 stuff.

svn path=/trunk/mcs/; revision=153230

mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/MethodInfo.cs

index 7df6372069bb2fcdb5e3a934bf5155c761fdbd06..252f5cbb36fa7bf9d0a9d8af3deadcd2149752f7 100644 (file)
@@ -1,6 +1,10 @@
 2010-03-07 Rodrigo Kumpera  <rkumpera@novell.com>
 
-       * ManifestResourceInfo.cs> Ne v4 .ctor.
+       * MethodInfo.cs: New v4 stuff.
+
+2010-03-07 Rodrigo Kumpera  <rkumpera@novell.com>
+
+       * ManifestResourceInfo.cs: New v4 .ctor.
 
 2010-02-28 Rodrigo Kumpera  <rkumpera@novell.com>
 
index 1e5814e04fe3c54c15c8091f030fff55322becd3..3a51d0046d9066ece67ab6672ccd56860fa172ee 100644 (file)
@@ -107,6 +107,7 @@ namespace System.Reflection {
                        return Type.EmptyTypes;
                }
 
+#if !NET_4_0
                public override bool IsGenericMethod {
                        get {
                                return false;
@@ -124,11 +125,43 @@ namespace System.Reflection {
                                return false;
                        }
                }
+#endif
 
                public virtual ParameterInfo ReturnParameter {
                        get {
                                throw new NotSupportedException ();
                        }
                }
+
+#if NET_4_0
+               public override bool Equals (object obj)
+               {
+                       return obj == this;
+               }
+
+               public override int GetHashCode ()
+               {
+                       return base.GetHashCode ();
+               }
+
+               public static bool operator == (MethodInfo left, MethodInfo right)
+               {
+                       if ((object)left == (object)right)
+                               return true;
+                       if ((object)left == null ^ (object)right == null)
+                               return false;
+                       return left.Equals (right);
+               }
+
+               public static bool operator != (MethodInfo left, MethodInfo right)
+               {
+                       if ((object)left == (object)right)
+                               return false;
+                       if ((object)left == null ^ (object)right == null)
+                               return true;
+                       return !left.Equals (right);
+               }
+#endif
+
        }
 }