public static ItemShortInfos FromList(List <ItemKeyWithCNName> itemKeyWithNames) { var insts = new ItemShortInfos(); foreach (var keWithName in itemKeyWithNames) { insts[keWithName.ITEMTABLENAME] = keWithName.ITEMCHNAME; } return(insts); }
public static ItemShortInfos FromDictonary(Dictionary <string, string> data) { var insts = new ItemShortInfos(); foreach (var item in data) { insts[item.Key] = item.Value == null ? string.Empty : item.Value; } return(insts); }