From: Martin Baulig Date: Wed, 10 Mar 2004 22:10:20 +0000 (-0000) Subject: 2004-03-10 Martin Baulig X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=19b9e32cfa2e9c278ca270c516fd357295113a88;p=mono.git 2004-03-10 Martin Baulig * MethodBase.cs (MethodBase): Implemented GetGenericMethodDefinition() and HasGenericParameters. svn path=/trunk/mcs/; revision=23899 --- diff --git a/mcs/class/corlib/System.Reflection/ChangeLog b/mcs/class/corlib/System.Reflection/ChangeLog index 881c21645be..dfcd624890e 100644 --- a/mcs/class/corlib/System.Reflection/ChangeLog +++ b/mcs/class/corlib/System.Reflection/ChangeLog @@ -1,3 +1,8 @@ +2004-03-10 Martin Baulig + + * MethodBase.cs (MethodBase): Implemented + GetGenericMethodDefinition() and HasGenericParameters. + 2004-03-09 Martin Baulig * MonoEvent.cs (MonoEventInfo): Replaced `parent' with diff --git a/mcs/class/corlib/System.Reflection/MethodBase.cs b/mcs/class/corlib/System.Reflection/MethodBase.cs index ebd86085760..539d697021b 100644 --- a/mcs/class/corlib/System.Reflection/MethodBase.cs +++ b/mcs/class/corlib/System.Reflection/MethodBase.cs @@ -140,5 +140,24 @@ namespace System.Reflection { } throw new Exception ("Method is not a builder method"); } + +#if NET_1_2 + [MethodImplAttribute(MethodImplOptions.InternalCall)] + extern MethodInfo GetGenericMethodDefinition_impl (); + + public virtual MethodInfo GetGenericMethodDefinition () + { + MethodInfo res = GetGenericMethodDefinition_impl (); + if (res == null) + throw new InvalidOperationException (); + + return res; + } + + public extern bool HasGenericParameters { + [MethodImplAttribute(MethodImplOptions.InternalCall)] + get; + } +#endif } }