public static object ToTableType(this IEnumerable <Pair <string, string> > values) { if ((values == null) || (values.ToList().Count == 0)) { return(StringStringPair.EmptyTable); } else { StringStringDictionary r = new StringStringDictionary(); foreach (Pair <string, string> kp in values) { r.Add(kp.Item1, kp.Item2); } return(r); } }
public static object ToTableType(this Dictionary <string, string> values) { if ((values == null) || (values.Count == 0)) { return(StringStringDictionary.EmptyTable); } else { StringStringDictionary r = new StringStringDictionary(); foreach (KeyValuePair <string, string> kp in values) { r.Add(kp.Key, kp.Value); } return(r); } }