diff options
author | jfrijters <jfrijters> | 2010-02-09 10:22:40 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2010-02-09 10:22:40 +0300 |
commit | df193e6f4d650352cb10699870c13cb9abe8a37f (patch) | |
tree | bd8964ce3b616ccfe0299674c2e6d8a6c9edcf35 /reflect/GenericWrappers.cs | |
parent | 42f8158fe1da985b0e7f85d7dd676c313a1e2435 (diff) |
Removed some no longer needed remnants from when we had multiple generic ParameterInfo wrapper implementations.
Diffstat (limited to 'reflect/GenericWrappers.cs')
-rw-r--r-- | reflect/GenericWrappers.cs | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/reflect/GenericWrappers.cs b/reflect/GenericWrappers.cs index ad2df635..703a58c8 100644 --- a/reflect/GenericWrappers.cs +++ b/reflect/GenericWrappers.cs @@ -66,13 +66,16 @@ namespace IKVM.Reflection public override ParameterInfo ReturnParameter { - get { return new GenericParameterInfoImpl(this, this, method.ReturnParameter); } + get { return new GenericParameterInfoImpl(this, method.ReturnParameter); } } public override ParameterInfo[] GetParameters() { ParameterInfo[] parameters = method.GetParameters(); - WrapGenericParameterInfos(this, this, parameters); + for (int i = 0; i < parameters.Length; i++) + { + parameters[i] = new GenericParameterInfoImpl(this, parameters[i]); + } return parameters; } @@ -328,14 +331,12 @@ namespace IKVM.Reflection sealed class GenericParameterInfoImpl : ParameterInfo { - private readonly MemberInfo member; - private readonly IGenericBinder binder; + private readonly GenericMethodInstance method; private readonly ParameterInfo parameterInfo; - internal GenericParameterInfoImpl(MemberInfo member, IGenericBinder binder, ParameterInfo parameterInfo) + internal GenericParameterInfoImpl(GenericMethodInstance method, ParameterInfo parameterInfo) { - this.member = member; - this.binder = binder; + this.method = method; this.parameterInfo = parameterInfo; } @@ -346,7 +347,7 @@ namespace IKVM.Reflection public override Type ParameterType { - get { return parameterInfo.ParameterType.BindTypeParameters(binder); } + get { return parameterInfo.ParameterType.BindTypeParameters(method); } } public override ParameterAttributes Attributes @@ -367,20 +368,20 @@ namespace IKVM.Reflection public override Type[] GetOptionalCustomModifiers() { Type[] modifiers = parameterInfo.GetOptionalCustomModifiers(); - Type.InplaceBindTypeParameters(binder, modifiers); + Type.InplaceBindTypeParameters(method, modifiers); return modifiers; } public override Type[] GetRequiredCustomModifiers() { Type[] modifiers = parameterInfo.GetRequiredCustomModifiers(); - Type.InplaceBindTypeParameters(binder, modifiers); + Type.InplaceBindTypeParameters(method, modifiers); return modifiers; } public override MemberInfo Member { - get { return member; } + get { return method; } } public override int MetadataToken @@ -390,7 +391,7 @@ namespace IKVM.Reflection internal override Module Module { - get { return member.Module; } + get { return method.Module; } } } |