public void AddParam(string name, object value) { if (null == _params) { _params = new List <ReportParamV2>(); } ReportParamV2 param = GenerateParameter(name, value); _params.Add(param); }
public void SetParamValue(string name, object value) { ReportParamV2 param = _params.FirstOrDefault( p => p.Name.Equals(name, StringComparison.CurrentCultureIgnoreCase) ); ReportParamV2 newParam = GenerateParameter(name, value); if (param != null) { int paramIndex = _params.IndexOf(param); _params[paramIndex] = newParam; } else { _params.Add(newParam); } }