internal static void OnAnalyzerException_NoTelemetryLogging( DiagnosticAnalyzer analyzer, Diagnostic?diagnostic, AbstractHostDiagnosticUpdateSource?hostDiagnosticUpdateSource, ProjectId?projectId) { if (diagnostic != null) { hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, hostDiagnosticUpdateSource?.Workspace, projectId); } }
internal static void OnAnalyzerException_NoTelemetryLogging( Exception e, DiagnosticAnalyzer analyzer, Diagnostic diagnostic, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, ProjectId projectOpt = null) { if (diagnostic != null) { hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, hostDiagnosticUpdateSource?.Workspace, projectOpt); } if (IsBuiltInAnalyzer(analyzer)) { FatalError.ReportWithoutCrashUnlessCanceled(e); } }
public static Action <Diagnostic> GetAddExceptionDiagnosticDelegate(DiagnosticAnalyzer analyzer, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, Workspace workspace) { return(diagnostic => hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, workspace, null)); }
public static Action <Diagnostic> GetAddExceptionDiagnosticDelegate(DiagnosticAnalyzer analyzer, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, Project project) { return(diagnostic => hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, project.Solution.Workspace, project)); }