Пример #1
0
        private void LoadWordsFromDocument(XDocument document)
        {
            RecognizedWords.UnionWith(GetWordsOrExceptions("Recognized", "Word"));
            UnrecognizedWords.UnionWith(GetWordsOrExceptions("Unrecognized", "Word"));

            IEnumerable <string> GetWordsOrExceptions(string section, string property) =>
            GetValues(GetElements(document, section, property), ExtractInnerText);
        }
Пример #2
0
 protected CodeAnalysisDictionary(IEnumerable <string> recognizedWords)
 {
     RecognizedWords.UnionWith(recognizedWords);
 }
Пример #3
0
 /// <summary>
 /// Replaces this instance's <see cref="RecognizedWords"/> and <see cref="UnrecognizedWords"/> with
 /// the union of its words and <paramref name="other"/>'s words.
 /// </summary>
 /// <param name="other">Another instance of this class.</param>
 /// <returns>This instance with words added from the other instance.</returns>
 public CodeAnalysisDictionary CombineWith(CodeAnalysisDictionary other)
 {
     RecognizedWords.UnionWith(other.RecognizedWords);
     UnrecognizedWords.UnionWith(other.UnrecognizedWords);
     return(this);
 }