public void Add(string key, SelfDisposingBitmapDrawable bitmap) { if (string.IsNullOrWhiteSpace(key) || bitmap == null || _cache.ContainsKey(key)) { return; } _cache.Add(key, bitmap); }
public void Add(string key, ImageInformation imageInformation, ISelfDisposingBitmapDrawable bitmap) { if (string.IsNullOrWhiteSpace(key) || bitmap == null || bitmap.Handle == IntPtr.Zero || !bitmap.HasValidBitmap || _cache.ContainsKey(key)) { return; } _imageInformations.TryAdd(key, imageInformation); _cache.Add(key, bitmap); }