private static Pen getPen(StylePen stylePen) { if (stylePen == null) { return(null); } PenLookupKey key = new PenLookupKey(stylePen.GetType().TypeHandle, stylePen.GetHashCode()); Pen pen; _penCache.TryGetValue(key, out pen); return(pen); }
private static void savePen(StylePen stylePen, Pen pen) { _penCache[new PenLookupKey(stylePen.GetType().TypeHandle, stylePen.GetHashCode())] = pen; }