diff options
author | jfrijters <jfrijters> | 2011-03-07 10:56:52 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-03-07 10:56:52 +0300 |
commit | c8bd51dffb05d9a49e361bcb31389a2cae8ff46b (patch) | |
tree | 4f57ae598261ab9f85170b8ab83786c26abd04f7 /reflect/GenericWrappers.cs | |
parent | 0dc7ce26b2e25a1e3ad0b6259f9b39e4294fa80f (diff) |
Added API extension __GetMethodOnTypeDefinition() to easily go from MethodBase on generic type instance to the equivalent MethodBase on the generic type definition.
The alternative way of doing this (mb.Module.ResolveMethod(mb.MetadataToken)) doesn't work with missing members, because they don't have a metadata token.
Diffstat (limited to 'reflect/GenericWrappers.cs')
-rw-r--r-- | reflect/GenericWrappers.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/reflect/GenericWrappers.cs b/reflect/GenericWrappers.cs index cb245d4d..97f6c782 100644 --- a/reflect/GenericWrappers.cs +++ b/reflect/GenericWrappers.cs @@ -185,6 +185,11 @@ namespace IKVM.Reflection throw new InvalidOperationException(); } + public override MethodBase __GetMethodOnTypeDefinition() + { + return method; + } + public override Type[] GetGenericArguments() { if (methodArgs == null) |