Beispiel #1
0
        private static Brush getBrush(StyleBrush styleBrush)
        {
            if (styleBrush == null)
            {
                return(null);
            }

            BrushLookupKey key = new BrushLookupKey(styleBrush.GetType().TypeHandle, styleBrush.GetHashCode());
            Brush          brush;

            _brushCache.TryGetValue(key, out brush);
            return(brush);
        }
Beispiel #2
0
 private static void saveBrush(StyleBrush styleBrush, Brush brush)
 {
     _brushCache[new BrushLookupKey(styleBrush.GetType().TypeHandle, styleBrush.GetHashCode())] = brush;
 }