public VisualStyleProvider(IStyleInflater styleInflater, IDictionary <Type, IEnumerable <IStyleRule> > visualTypeRules) { _styleInflater = styleInflater; _cachedTypeStyleRules = new ConcurrentDictionary <Type, HashSet <IStyleRule> >(); _visualTypeRules = new ConcurrentDictionary <Type, List <IStyleRule> >(); _cookedTypeStyles = new ConcurrentDictionary <Type, IStyleSheet>(); foreach (var kvpp in visualTypeRules) { _visualTypeRules[kvpp.Key] = new List <IStyleRule>(kvpp.Value); } //_themeProvider = themeProvider; _lockStylesByClassName = new Object(); _stylesByClassName = new Dictionary <String, HashSet <IStyleRule> >(); _lockStylesByName = new Object(); _stylesByName = new Dictionary <String, IStyleSheet?>(); _resourcesLock = new Object(); _resourcesRead = new HashSet <String>(); _typeClassStyles = new DoubleConcurrentDictionary <Type, String, IStyleSheet>(); //_typeStyleStyles = new DoubleConcurrentDictionary<Type, String, IStyleSheet>(); }
// ReSharper disable once UnusedMember.Global public VisualStyleProvider(IStyleInflater styleInflater) : this(styleInflater, new Dictionary <Type, IEnumerable <IStyleRule> >()) { }