public QuickTypeIdentifierAttributeChecker AddAliasesIfAny(ImmutableDictionary <string, AliasAndUsingDirective> usingAliases)
        {
            QuickTypeIdentifierAttributeChecker newChecker = null;

            foreach (KeyValuePair <string, AliasAndUsingDirective> pair in usingAliases)
            {
                if (_candidates.Contains(pair.Value.UsingDirective.Name.GetUnqualifiedName().Identifier.ValueText))
                {
                    (newChecker ?? (newChecker = new QuickTypeIdentifierAttributeChecker(this))).AddCandidate(pair.Key);
                }
            }

            if (newChecker != null)
            {
#if DEBUG
                newChecker._sealed = true;
#endif
                return(newChecker);
            }

            return(this);
        }
 private QuickTypeIdentifierAttributeChecker(QuickTypeIdentifierAttributeChecker previous)
 {
     _candidates = new HashSet <string>(previous._candidates);
 }