Пример #1
0
 public bool TryGet(string key, out Bitmap bmp)
 {
     if ((bmp = memCache.Get(key)) != null)
     {
         return(true);
     }
     return(diskCache.TryGet(key, out bmp));
 }
Пример #2
0
        public bool TryGet(string key, out SelfDisposingBitmapDrawable drawable)
        {
            if (memCache.TryGetValue(new Uri(key), out drawable))
            {
                return(true);
            }

            Bitmap bmp;

            if (!diskCache.TryGet(key, out bmp))
            {
                return(false);
            }

            drawable = CreateCacheableDrawable(bmp);
            return(true);
        }