protected IList <IParameter> CreateParameters(TypeVisitor substitution) { var paramDefs = ((IParameterizedMember)this.baseMember).Parameters; if (paramDefs.Count == 0) { return(EmptyList <IParameter> .Instance); } else { var parameters = new IParameter[paramDefs.Count]; for (int i = 0; i < parameters.Length; i++) { IType newType = paramDefs[i].Type.AcceptVisitor(substitution); if (newType != paramDefs[i].Type) { parameters[i] = new SpecializedParameter(paramDefs[i], newType); } else { parameters[i] = paramDefs[i]; } } return(Array.AsReadOnly(parameters)); } }
protected override void Initialize(TypeVisitor substitution) { base.Initialize(substitution); var paramDefs = ((IParameterizedMember)this.MemberDefinition).Parameters; if (paramDefs.Count == 0) { this.parameters = EmptyList <IParameter> .Instance; } else { var parameters = new IParameter[paramDefs.Count]; for (int i = 0; i < parameters.Length; i++) { IType newType = Substitute(paramDefs[i].Type, substitution); if (newType != paramDefs[i].Type) { parameters[i] = new SpecializedParameter(paramDefs[i], newType); } else { parameters[i] = paramDefs[i]; } } this.parameters = Array.AsReadOnly(parameters); } }
protected override void Initialize(TypeVisitor substitution) { base.Initialize(substitution); var paramDefs = ((IParameterizedMember)this.MemberDefinition).Parameters; if (paramDefs.Count == 0) { this.parameters = EmptyList<IParameter>.Instance; } else { var parameters = new IParameter[paramDefs.Count]; for (int i = 0; i < parameters.Length; i++) { IType newType = Substitute(paramDefs[i].Type, substitution); if (newType != paramDefs[i].Type) { parameters[i] = new SpecializedParameter(paramDefs[i], newType); } else { parameters[i] = paramDefs[i]; } } this.parameters = Array.AsReadOnly(parameters); } }
protected IList<IParameter> CreateParameters(TypeVisitor substitution) { var paramDefs = ((IParameterizedMember)this.baseMember).Parameters; if (paramDefs.Count == 0) { return EmptyList<IParameter>.Instance; } else { var parameters = new IParameter[paramDefs.Count]; for (int i = 0; i < parameters.Length; i++) { IType newType = paramDefs[i].Type.AcceptVisitor(substitution); if (newType != paramDefs[i].Type) { parameters[i] = new SpecializedParameter(paramDefs[i], newType); } else { parameters[i] = paramDefs[i]; } } return Array.AsReadOnly(parameters); } }