public override bool Equals(object obj) { bool result = false; if (obj is FreeParameter) { FreeParameter prm = (FreeParameter)obj; result = this.Name.Equals(prm.Name); } return(result); }
/// <summary> /// Adds or Updates Value for given key. /// </summary> /// <param name="key">key for parametername.</param> /// <param name="value">value for given key</param> public void Set(string key, object value) { if (!string.IsNullOrWhiteSpace(key)) { int indx = _paramList.IndexOf(new FreeParameter { Name = key }); FreeParameter prmtr; if (indx != -1) { prmtr = _paramList[indx]; prmtr.Value = value; } else { prmtr = new FreeParameter(key, value); prmtr.Direction = ParameterDirection.Input; _paramList.Add(prmtr); } } }