2004-03-29 Martin Baulig <martin@ximian.com>
authorMartin Baulig <martin@novell.com>
Tue, 30 Mar 2004 00:27:57 +0000 (00:27 -0000)
committerMartin Baulig <martin@novell.com>
Tue, 30 Mar 2004 00:27:57 +0000 (00:27 -0000)
* MethodBase.cs (MethodBase.Mono_IsInflatedMethod): New public
virtual property.
(MethodBase.HasGenericParameters): Use the "official" behavior
here, ie. return false if we're not a generic method.

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

mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs
mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs
mcs/class/corlib/System.Reflection/ChangeLog
mcs/class/corlib/System.Reflection/MethodBase.cs
mcs/class/corlib/System.Reflection/MonoMethod.cs

index 225a7c266c737d3b977081b494a5181d651cefa2..5ec7a2f6a3452d5c3bb7611097d2a478a31b4958 100644 (file)
@@ -216,6 +216,12 @@ namespace System.Reflection.Emit {
                }
 
 #if NET_1_2
+               public override bool Mono_IsInflatedMethod {
+                       get {
+                               return false;
+                       }
+               }
+
                public override bool HasGenericParameters {
                        get {
                                return false;
index 931aa0e8508cfb9f1a511cc6b96fd8ed2be89902..4849acb9c63f91ca8627c99b00a766241082ff14 100755 (executable)
@@ -332,6 +332,12 @@ namespace System.Reflection.Emit {
                        generic_params [index].SetConstraints (constraints);
                }
 
+               public override bool Mono_IsInflatedMethod {
+                       get {
+                               return false;
+                       }
+               }
+
                public override bool HasGenericParameters {
                        get {
                                return generic_params != null;
index cb7911a8b933281e9e132095c91b5c1aef89cec2..e89608781241121ae29b3d114b5f2b23b18be0b1 100644 (file)
@@ -1,3 +1,10 @@
+2004-03-29  Martin Baulig  <martin@ximian.com>
+
+       * MethodBase.cs (MethodBase.Mono_IsInflatedMethod): New public
+       virtual property.
+       (MethodBase.HasGenericParameters): Use the "official" behavior
+       here, ie. return false if we're not a generic method.
+
 2004-03-29  Martin Baulig  <martin@ximian.com>
 
        * MethodBase.cs: Moved the generics stuff here, made it virtual
index b713a50fdc8212396aee57ff57aa828870951754..e8db2c0bdc40c2c631b48ef381a6c8389bb48f99 100644 (file)
@@ -157,6 +157,12 @@ namespace System.Reflection {
                        throw new NotSupportedException ();
                }
 
+               public virtual bool Mono_IsInflatedMethod {
+                       get {
+                               throw new NotSupportedException ();
+                       }
+               }
+
                public virtual bool HasGenericParameters {
                        get {
                                throw new NotSupportedException ();
index e6b94b23f3d4b55692c88aef4d407eced75bbd42..d3e0cda13790594273d15834f0d03995bed30a0a 100755 (executable)
@@ -193,6 +193,11 @@ namespace System.Reflection {
                        return res;
                }
 
+               public override extern bool Mono_IsInflatedMethod {
+                       [MethodImplAttribute(MethodImplOptions.InternalCall)]
+                       get;
+               }
+
                public override extern bool HasGenericParameters {
                        [MethodImplAttribute(MethodImplOptions.InternalCall)]
                        get;
@@ -297,6 +302,23 @@ namespace System.Reflection {
                }
 
 #if NET_1_2
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               extern MethodInfo GetGenericMethodDefinition_impl ();
+
+               public override MethodInfo GetGenericMethodDefinition ()
+               {
+                       MethodInfo res = GetGenericMethodDefinition_impl ();
+                       if (res == null)
+                               throw new InvalidOperationException ();
+
+                       return res;
+               }
+
+               public override extern bool Mono_IsInflatedMethod {
+                       [MethodImplAttribute(MethodImplOptions.InternalCall)]
+                       get;
+               }
+
                public override bool HasGenericParameters {
                        get {
                                return false;