Ejemplo n.º 1
0
        protected override bool IsConfiguredDisallowedExceptionType(INamedTypeSymbol namedTypeSymbol, IMethodSymbol containingMethod, Compilation compilation, AnalyzerOptions analyzerOptions, CancellationToken cancellationToken)
        {
            if (base.IsConfiguredDisallowedExceptionType(namedTypeSymbol, containingMethod, compilation, analyzerOptions, cancellationToken))
            {
                return(true);
            }

            var symbolNamesOption = analyzerOptions.GetDisallowedSymbolNamesWithValueOption(Rule, containingMethod, compilation, cancellationToken);

            return(symbolNamesOption.Contains(namedTypeSymbol));
        }