コード例 #1
0
        Dictionary<PageKey, CachedItemInfo> GetCacheDict(int numPages, params Book[] books)
        {
            var dict = new Dictionary<PageKey, CachedItemInfo>();
            foreach(Book book in books)
            {
                for (int i = 0; i < numPages; i++)
                {
                    CachedItemInfo itemInfo = new CachedItemInfo();
                    itemInfo.LastAccessTime = BaseTime + TimeSpan.FromDays(i);

                    dict.Add(new PageKey(book.Id, i + 1, ScreenWidth), itemInfo);
                }
            }
            return dict;
        }
コード例 #2
0
        Dictionary<PageKey, CachedItemInfo> GetCacheDict(int numPages)
        {
            var dict = new Dictionary<PageKey, CachedItemInfo>();
            for (int i = 0; i < numPages; i++)
            {
                CachedItemInfo itemInfo = new CachedItemInfo();
                itemInfo.LastAccessTime = BaseTime + TimeSpan.FromDays(i);

                dict.Add(new PageKey(Guid.NewGuid(), ScreenWidth, i+1), itemInfo);
            }
            return dict;
        }