コード例 #1
0
 /// <summary>
 /// Copy constructor used to implement <see cref="Clone"/>.
 /// </summary>
 /// <param name="other">The other instance whose values we should copy.</param>
 protected CodeAnalysisDictionary(CodeAnalysisDictionary other)
 {
     RecognizedWords   = new HashSet <string>(other.RecognizedWords, StringComparer.OrdinalIgnoreCase);
     UnrecognizedWords = new HashSet <string>(other.UnrecognizedWords, StringComparer.OrdinalIgnoreCase);
 }
コード例 #2
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);
 }