diff options
author | jfrijters <jfrijters> | 2011-12-01 16:03:23 +0400 |
---|---|---|
committer | jfrijters <jfrijters> | 2011-12-01 16:03:23 +0400 |
commit | 72e3bfb7966341d49f9696e8c91fe3bc1f419d21 (patch) | |
tree | ff5a9239b099672ad9820b04226fffdc1ff14a77 /reflect/Reader | |
parent | 8159a8d12c3db9a81774a7c7cb247f93346359ce (diff) |
Added new overload of __ResolveOptionalParameterTypes() that supports resolving generic type parameters and custom modifiers.
Diffstat (limited to 'reflect/Reader')
-rw-r--r-- | reflect/Reader/ModuleReader.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/reflect/Reader/ModuleReader.cs b/reflect/Reader/ModuleReader.cs index 06a35b6c..0c51ab1d 100644 --- a/reflect/Reader/ModuleReader.cs +++ b/reflect/Reader/ModuleReader.cs @@ -708,19 +708,20 @@ namespace IKVM.Reflection.Reader throw new ArgumentOutOfRangeException(); } - public override Type[] __ResolveOptionalParameterTypes(int metadataToken) + public override Type[] __ResolveOptionalParameterTypes(int metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments, out CustomModifiers[] customModifiers) { if ((metadataToken >> 24) == MemberRefTable.Index) { int index = (metadataToken & 0xFFFFFF) - 1; int sig = MemberRef.records[index].Signature; - return Signature.ReadOptionalParameterTypes(this, GetBlob(sig)); + return Signature.ReadOptionalParameterTypes(this, GetBlob(sig), new GenericContext(genericTypeArguments, genericMethodArguments), out customModifiers); } else if ((metadataToken >> 24) == MethodDefTable.Index) { // for convenience, we support passing a MethodDef token as well, because in some places // it makes sense to have a vararg method that is referred to by its methoddef (e.g. ldftn). // Note that MethodSpec doesn't make sense, because generic methods cannot be vararg. + customModifiers = Empty<CustomModifiers>.Array; return Type.EmptyTypes; } throw new ArgumentOutOfRangeException(); |