예제 #1
0
        private void AddDictionaryToHierarchyTreesWithoutBuildTree(ILocalizationDictionary dictionary)
        {
            m_dictionaries.Add(dictionary);

            if (!m_dictionariesPerCultureAndScope.Keys.Contains(dictionary.CultureInfo()))
            {
                throw new DictionaryLoadException(string.Format(UnknownCultureException, dictionary.CultureInfo(), dictionary.Scope()));
            }

            var dictionariesPerCulture = m_dictionariesPerCultureAndScope[dictionary.CultureInfo()];

            dictionariesPerCulture.Add(dictionary.Scope(), dictionary);

            foreach (var scopeAlias in dictionary.ScopeAlias())
            {
                dictionariesPerCulture.Add(scopeAlias, dictionary);
            }
        }
예제 #2
0
        public void AddDictionaryToHierarchyTrees(ILocalizationDictionary dictionary)
        {
            AddDictionaryToHierarchyTreesWithoutBuildTree(dictionary);

            BuildDictionaryHierarchyTrees(m_dictionariesPerCultureAndScope[dictionary.CultureInfo()], dictionary);
        }