private FormatParameterEventArgs FormatParameterNameInternal(Parameter parameter, int ordinal) { var paramName = string.Format(DefaultParameterFormat, parameter.Name, ordinal); var sqlParamName = string.Format(DefaultParameterSqlPlaceholderFormat, ((parameter as BindVariableParameter)?.OpeningTag ?? "") + paramName); var e = new FormatParameterEventArgs { ParameterName = parameter.Name, FormattedName = paramName, FormattedForSqlPlaceholder = sqlParamName, }; OnFormatParameterName(this, e); return(e); }
/// <summary> /// Fires an event which can be used to format parameter names. /// </summary> protected virtual void OnFormatParameterName(object sender, FormatParameterEventArgs e) => FormatParameterName?.Invoke(sender, e);