public object GetIcon(string name, Color tint = default(Color))
        {
            var item = new IconCacheItem()
            {
                Name      = name,
                TintColor = tint
            };

            if (IconsCache.ContainsKey(item) && ((Equals(IconsCache[item], null)) || IconsCache[item].Equals(null)))
            {
                IconsCache.Remove(item);
            }
            if (!IconsCache.ContainsKey(item))
            {
                IconsCache.Add(item, ConstructIcon(name, tint));
            }
            return(IconsCache[item]);
        }
Exemplo n.º 2
0
 public bool Equals(IconCacheItem other)
 {
     return(string.Equals(Name, other.Name) && TintColor.Equals(other.TintColor));
 }