コード例 #1
0
ファイル: APBplDef.cs プロジェクト: MaddysTeam/Thesis
            public static ItemCache Cached(long pickListId)
            {
                Dictionary <string, ItemCache> cache = ResSettings.GetCache(typeof(ResPickList)) as Dictionary <string, ItemCache>;


                if (cache == null)
                {
                    ResSettings.SetCache(cache = new Dictionary <string, ItemCache>(), typeof(ResPickList));
                }


                foreach (var p in cache)
                {
                    if (p.Value.PKID == pickListId)
                    {
                        return(p.Value);
                    }
                }

                return(Cached(APBplDef.ResPickListBpl.PrimaryGet(pickListId).InnerKey));
            }
コード例 #2
0
ファイル: APBplDef.cs プロジェクト: MaddysTeam/Thesis
            public static ItemCache Cached(string innerKey)
            {
                Dictionary <string, ItemCache> cache = ResSettings.GetCache(typeof(ResPickList)) as Dictionary <string, ItemCache>;


                if (cache == null)
                {
                    ResSettings.SetCache(cache = new Dictionary <string, ItemCache>(), typeof(ResPickList));
                }


                if (cache.ContainsKey(innerKey))
                {
                    return(cache[innerKey]);
                }


                ItemCache itemCache = new ItemCache(APBplDef.ResPickListItemBpl.GetByPickListInnerKey(innerKey));

                cache[innerKey] = itemCache;


                return(itemCache);
            }