From: Martin Baulig Date: Tue, 30 Mar 2004 00:27:57 +0000 (-0000) Subject: 2004-03-29 Martin Baulig X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=95c7c99b76197ac8ef2cc8d68943935ff3fbc03d;p=mono.git 2004-03-29 Martin Baulig * 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 --- diff --git a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs index 225a7c266c7..5ec7a2f6a34 100644 --- a/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/ConstructorBuilder.cs @@ -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; diff --git a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs index 931aa0e8508..4849acb9c63 100755 --- a/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs +++ b/mcs/class/corlib/System.Reflection.Emit/MethodBuilder.cs @@ -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; diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog index cb7911a8b93..e8960878124 100644 --- a/mcs/class/corlib/System.Reflection/ChangeLog +++ b/mcs/class/corlib/System.Reflection/ChangeLog @@ -1,3 +1,10 @@ +2004-03-29 Martin Baulig + + * 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 * MethodBase.cs: Moved the generics stuff here, made it virtual diff --git a/mcs/class/corlib/System.Reflection/MethodBase.cs b/mcs/class/corlib/System.Reflection/MethodBase.cs index b713a50fdc8..e8db2c0bdc4 100644 --- a/mcs/class/corlib/System.Reflection/MethodBase.cs +++ b/mcs/class/corlib/System.Reflection/MethodBase.cs @@ -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 (); diff --git a/mcs/class/corlib/System.Reflection/MonoMethod.cs b/mcs/class/corlib/System.Reflection/MonoMethod.cs index e6b94b23f3d..d3e0cda1379 100755 --- a/mcs/class/corlib/System.Reflection/MonoMethod.cs +++ b/mcs/class/corlib/System.Reflection/MonoMethod.cs @@ -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;