/// <summary> /// 声明参数。 /// </summary> /// <param name="parameterType">参数类型。</param> /// <param name="attributes">属性。</param> /// <param name="strParamName">名称。</param> /// <returns></returns> public ParameterEmitter DefineParameter(Type parameterType, ParameterAttributes attributes, string strParamName) { var parameter = new ParameterEmitter(parameterType, ++parameterIndex, attributes, strParamName); parameters.Add(parameter); return(parameter); }
/// <summary> /// 声明参数。 /// </summary> /// <param name="parameterType">参数类型。</param> /// <param name="attributes">属性。</param> /// <param name="name">名称。</param> /// <returns></returns> public virtual ParameterEmitter DefineParameter(Type parameterType, ParameterAttributes attributes, string name) { var parameter = new ParameterEmitter(parameterType, (Attributes & MethodAttributes.Static) == MethodAttributes.Static ? parameterIndex++ : ++parameterIndex, attributes, name); parameters.Add(parameter); return(parameter); }