public void Add <TValue>(string name, TValue value, ParameterDirection direction) { parameters.AddOrUpdate(name, new PartialParamInfo <TValue>(typeof(TValue), name, value, direction), (key, paramInfo) => { PartialParamInfo <TValue> existing = (PartialParamInfo <TValue>)paramInfo; if (!existing.Value.Equals(value) || existing.TypeOfValue != typeof(TValue) || existing.Direction != direction) { return(new PartialParamInfo <TValue>(typeof(TValue), name, value, direction)); } return(existing); }); }
public void Add(Type tValue, string name, object value, ParameterDirection direction) { parameters.AddOrUpdate(name, new PartialParamInfo <object>(tValue, name, value, direction), (key, paramInfo) => { PartialParamInfo <object> existing = (PartialParamInfo <object>)paramInfo; if (!existing.Value.Equals(value) || existing.TypeOfValue != tValue || existing.Direction != direction) { return(new PartialParamInfo <object>(tValue, name, value, direction)); } return(existing); }); }