public virtual bool TryGetDetail(string key, out object detail) { if (string.IsNullOrEmpty(key)) { throw new ArgumentNullException("key"); } bool containsDetail = false; detail = null; if (Ids.ContainsKey(key)) { containsDetail = true; detail = Ids[key]; } else if (Strings.ContainsKey(key)) { containsDetail = true; detail = Strings[key]; } else if (Ints.ContainsKey(key)) { containsDetail = true; detail = Ints[key]; } else if (Doubles.ContainsKey(key)) { containsDetail = true; detail = Doubles[key]; } return(containsDetail); }
public static int GetInt(string key) { if (Ints == null) { Ints = new Dictionary <string, int>(); } return((Ints.ContainsKey(key)) ? Ints[key] : 0); }