/// <summary> /// Return <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> of given <paramref name="analyzer"/>. /// </summary> public ImmutableArray <DiagnosticDescriptor> GetDiagnosticDescriptors(DiagnosticAnalyzer analyzer) { Func <Exception, DiagnosticAnalyzer, bool> continueOnAnalyzerException = (ex, a) => !AnalyzerHelper.IsBuiltInAnalyzer(analyzer); var analyzerExecutor = AnalyzerHelper.GetAnalyzerExecutorForSupportedDiagnostics(analyzer, _hostDiagnosticUpdateSource, continueOnAnalyzerException, CancellationToken.None); return(AnalyzerManager.Instance.GetSupportedDiagnosticDescriptors(analyzer, analyzerExecutor)); }
/// <summary> /// Return <see cref="DiagnosticAnalyzer.SupportedDiagnostics"/> of given <paramref name="analyzer"/>. /// </summary> public ImmutableArray <DiagnosticDescriptor> GetDiagnosticDescriptors(DiagnosticAnalyzer analyzer) { var analyzerExecutor = AnalyzerHelper.GetAnalyzerExecutorForSupportedDiagnostics(analyzer, _hostDiagnosticUpdateSource); return(AnalyzerManager.Instance.GetSupportedDiagnosticDescriptors(analyzer, analyzerExecutor)); }