Example #1
0
        private static void shiftFromLast(ImageCacheEntry cacheEntry)
        {
            var ratingEntry   = cacheEntry.RatingEntry;
            var previousEntry = ratingEntry.Previous;

            if (previousEntry != null)
            {
                ratingEntry.SwapWith(previousEntry);
            }
        }
Example #2
0
        private bool addFirst(FsPath path, RotateFlipType rotations, Bitmap image)
        {
            var key = new Tuple <FsPath, RotateFlipType>(path, rotations);

            if (_imagesByPath.ContainsKey(key))
            {
                return(false);
            }

            _ratings.AddFirst(key);
            _imagesByPath[key] = new ImageCacheEntry(image, _ratings.First);

            return(true);
        }