TryGetFromCache() публичный Метод

public TryGetFromCache ( string address ) : MemoryImage
address string
Результат MemoryImage
Пример #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;
            }
        }
Пример #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;
            }
        }