Пример #1
0
 public bool TryGetGraphicDrawerFactory(Type key, out IGraphicDrawerFactory value)
 {
     if (!graphicDrawerCache.TryGetValue(key, out value))
     {
         foreach (var graphicDrawer in graphicDrawers)
         {
             if (graphicDrawer.IsValidFor(key))
             {
                 value = graphicDrawer;
                 break;
             }
         }
         graphicDrawerCache[key] = value;
     }
     return(value != null);
 }
Пример #2
0
 public void RegisterDrawer(IGraphicDrawerFactory graphicDrawer)
 {
     graphicDrawers.Add(graphicDrawer);
 }