예제 #1
0
        private void mapNames()
        {
            nameLookupTable.Clear();
            int i = 0;

            foreach (var name in names)
            {
                nameLookupTable[name] = i;
                i++;
            }
        }
        /// <summary>
        /// Retrieves the setting substitutions and rebuilds the internal list.
        /// </summary>
        public void ReadSettings()
        {
            // Clear out the existing settings.
            CaseInsensitiveDictionary.Clear();
            CaseSensitiveDictionary.Clear();

            // Go through all of the settings in the various projects.
            IList <LocalWordsSettings> settingsList =
                Project.Settings.GetAll <LocalWordsSettings>(LocalWordsSettings.SettingsPath);

            foreach (LocalWordsSettings settings in settingsList)
            {
                // Add the two dictionaries.
                foreach (string word in settings.CaseInsensitiveDictionary)
                {
                    CaseInsensitiveDictionary.Add(word);
                }

                foreach (string word in settings.CaseSensitiveDictionary)
                {
                    CaseSensitiveDictionary.Add(word);
                }
            }
        }