コード例 #1
0
ファイル: EntityDTO.cs プロジェクト: yangdengfeng/Platform
        public static ItemShortInfos FromList(List <ItemKeyWithCNName> itemKeyWithNames)
        {
            var insts = new ItemShortInfos();

            foreach (var keWithName in itemKeyWithNames)
            {
                insts[keWithName.ITEMTABLENAME] = keWithName.ITEMCHNAME;
            }
            return(insts);
        }
コード例 #2
0
ファイル: EntityDTO.cs プロジェクト: yangdengfeng/Platform
        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);
        }