Example #1
0
        private ImmutableArray <Diagnostic> GetDiagnostics(IEnumerable <DiagnosticAnalyzer> analyzers)
        {
            var excludedAnalyzers    = Analyzers.Except(analyzers);
            var excludedAnalyzersSet = excludedAnalyzers.Any() ? excludedAnalyzers.ToImmutableHashSet() : ImmutableHashSet <DiagnosticAnalyzer> .Empty;

            return(GetDiagnostics(excludedAnalyzersSet));
        }
Example #2
0
        internal ImmutableArray <Diagnostic> GetDiagnostics(IEnumerable <DiagnosticAnalyzer> analyzers, bool getLocalSyntaxDiagnostics, bool getLocalSemanticDiagnostics, bool getNonLocalDiagnostics)
        {
            var excludedAnalyzers    = Analyzers.Except(analyzers);
            var excludedAnalyzersSet = excludedAnalyzers.Any() ? excludedAnalyzers.ToImmutableHashSet() : ImmutableHashSet <DiagnosticAnalyzer> .Empty;

            return(GetDiagnostics(excludedAnalyzersSet, getLocalSyntaxDiagnostics, getLocalSemanticDiagnostics, getNonLocalDiagnostics));
        }