Ejemplo n.º 1
0
        private static void RecalcTypeTrees <T>(TypeSelector <T> selector, Dictionary <Type, List <Pair> > group) where T : class
        {
            var validDefaults = group[typeof(T)];

            selector.Clear();
            foreach (var entry in validDefaults)
            {
                var att = entry.Item1;
                var ist = Activator.CreateInstance(entry.Item2);
                selector.AddValue(att.AssociatedType, att.UseInChildren, (T)ist);
            }
        }
Ejemplo n.º 2
0
 public void AddFormatter(Type type, bool useInChildren, IGraphFormatter formatter)
 {
     m_formatters.AddValue(type, useInChildren, formatter);
 }