예제 #1
0
        public Bitmap Get(string image)
        {
            if (string.IsNullOrEmpty(image))
            {
                return(decorated.Get(image));
            }
            var bitmap = cache.Get(image) as Bitmap;

            if (bitmap != null)
            {
                return(bitmap);
            }

            bitmap = decorated.Get(image);
            if (bitmap != null)
            {
                cache.Put(image, bitmap);
            }

            return(bitmap);
        }
예제 #2
0
 public Bitmap GetBitmap(string image)
 {
     return(bitmapRepository.Get(image));
 }