TryGetFromCache() public method

public TryGetFromCache ( string address ) : MemoryImage
address string
return MemoryImage
Ejemplo n.º 1
0
        public ImageListViewItem(string[] items, ImageCache imageCache, string imageUrl)
            : base(items)
        {
            this.imageCache = imageCache;
            this.imageUrl   = imageUrl;
            this.StateIndex = -1;

            var image = imageCache?.TryGetFromCache(imageUrl);

            if (image != null)
            {
                this.imageReference.Target = image;
            }
        }
Ejemplo n.º 2
0
        public ImageListViewItem(string[] items, ImageCache imageCache, string imageUrl)
            : base(items, imageUrl)
        {
            this.imageCache = imageCache;
            this.imageUrl = imageUrl;

            if (imageCache != null)
            {
                var image = imageCache.TryGetFromCache(imageUrl);

                if (image != null)
                    this.imageReference.Target = image;
            }
        }