Browse Source

2010-03-07 Rodrigo Kumpera <[email protected]>

	* MethodInfo.cs: New v4 stuff.

svn path=/trunk/mcs/; revision=153230
Rodrigo Kumpera 16 years ago
parent
commit
2dc6b499cb

+ 5 - 1
mcs/class/corlib/System.Reflection/ChangeLog

@@ -1,6 +1,10 @@
 2010-03-07 Rodrigo Kumpera  <[email protected]>
 
-	* ManifestResourceInfo.cs> Ne v4 .ctor.
+	* MethodInfo.cs: New v4 stuff.
+
+2010-03-07 Rodrigo Kumpera  <[email protected]>
+
+	* ManifestResourceInfo.cs: New v4 .ctor.
 
 2010-02-28 Rodrigo Kumpera  <[email protected]>
 

+ 33 - 0
mcs/class/corlib/System.Reflection/MethodInfo.cs

@@ -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
+
 	}
 }