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; }
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; }