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); }
/// <summary> /// Id column by default skipped and can be multiply /// </summary> /// <param name="col"></param> public void AddIdColumn(string col) { string ncol = col.ToLower(); if (!Ids.ContainsKey(ncol)) { Ids.Add(ncol.ToLower(), 1); } AddSkipColumn(ncol); }