示例#1
0
            public void ImplementsType <T>(bool direct)
                where T : class
            {
                if (Formatter != null)
                {
                    return;
                }

                ILayoutFormatter formatter;

                lock (_formatters)
                {
                    if (_formatters.TryGetValue(typeof(T), out formatter))
                    {
                        Formatter = formatter;
                    }
                }
            }
示例#2
0
 public void Add <T>(ILayoutFormatter <T> formatter)
     where T : Layout
 {
     _layoutFormatters[formatter.LayoutType] = formatter;
 }