internal override ParameterInfo[] GetParametersInternal() { ParameterInfo [] res; if (cb is ConstructorBuilder) { ConstructorBuilder cbuilder = (ConstructorBuilder)cb; res = new ParameterInfo [cbuilder.parameters.Length]; for (int i = 0; i < cbuilder.parameters.Length; i++) { Type type = instantiation.InflateType(cbuilder.parameters [i]); res [i] = new ParameterInfo(cbuilder.pinfo == null ? null : cbuilder.pinfo [i], type, this, i + 1); } } else { ParameterInfo[] parms = cb.GetParameters(); res = new ParameterInfo [parms.Length]; for (int i = 0; i < parms.Length; i++) { Type type = instantiation.InflateType(parms [i].ParameterType); res [i] = new ParameterInfo(parms [i], type, this, i + 1); } } return(res); }
public override ParameterInfo[] GetParameters() { /*FIXME, maybe the right thing to do when the type is creates is to retrieve from the inflated type*/ if (!instantiation.IsCreated) { throw new NotSupportedException(); } ParameterInfo [] res; if (cb is ConstructorBuilder) { ConstructorBuilder cbuilder = (ConstructorBuilder)cb; res = new ParameterInfo [cbuilder.parameters.Length]; for (int i = 0; i < cbuilder.parameters.Length; i++) { Type type = instantiation.InflateType(cbuilder.parameters [i]); res [i] = new ParameterInfo(cbuilder.pinfo == null ? null : cbuilder.pinfo [i], type, this, i + 1); } } else { ParameterInfo[] parms = cb.GetParameters(); res = new ParameterInfo [parms.Length]; for (int i = 0; i < parms.Length; i++) { Type type = instantiation.InflateType(parms [i].ParameterType); res [i] = new ParameterInfo(parms [i], type, this, i + 1); } } return(res); }
public override ParameterInfo [] GetParameters() { ParameterInfo [] res = null; if (!IsCompilerContext) { throw new NotSupportedException(); } if (base_method is MethodBuilder) { MethodBuilder mb = (MethodBuilder)base_method; res = new ParameterInfo [mb.parameters.Length]; for (int i = 0; i < mb.parameters.Length; i++) { Type type = MonoGenericClass.InflateType(mb.parameters [i], GetTypeArgs(), method_arguments); res [i] = new ParameterInfo(mb.pinfo == null ? null : mb.pinfo [i + 1], type, this, i + 1); } } else { ParameterInfo[] base_params = base_method.GetParameters(); res = new ParameterInfo [base_params.Length]; for (int i = 0; i < base_params.Length; i++) { Type type = MonoGenericClass.InflateType(base_params [i].ParameterType, GetTypeArgs(), method_arguments); res [i] = new ParameterInfo(base_params [i], type, this, i + 1); } } return(res); }
public override ParameterInfo[] GetParameters() { if (!((ModuleBuilder)cb.Module).assemblyb.IsCompilerContext && !instantiation.generic_type.is_created) { throw new NotSupportedException(); } ParameterInfo [] res = new ParameterInfo [cb.parameters.Length]; for (int i = 0; i < cb.parameters.Length; i++) { Type type = instantiation.InflateType(cb.parameters [i]); res [i] = new ParameterInfo(cb.pinfo == null ? null : cb.pinfo [i], type, this, i + 1); } return(res); }
public override ParameterInfo [] GetParameters() { if (!((ModuleBuilder)mb.Module).assemblyb.IsCompilerContext) { throw new NotSupportedException(); } ParameterInfo [] res = new ParameterInfo [mb.parameters.Length]; for (int i = 0; i < mb.parameters.Length; i++) { Type type = instantiation.InflateType(mb.parameters [i], method_arguments); res [i] = new ParameterInfo(mb.pinfo == null ? null : mb.pinfo [i + 1], type, this, i + 1); } return(res); }