コード例 #1
0
 internal static void OnAnalyzerException_NoTelemetryLogging(
     DiagnosticAnalyzer analyzer,
     Diagnostic?diagnostic,
     AbstractHostDiagnosticUpdateSource?hostDiagnosticUpdateSource,
     ProjectId?projectId)
 {
     if (diagnostic != null)
     {
         hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, hostDiagnosticUpdateSource?.Workspace, projectId);
     }
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
ファイル: AnalyzerHelper.cs プロジェクト: jbe2277/roslyn
 public static Action <Diagnostic> GetAddExceptionDiagnosticDelegate(DiagnosticAnalyzer analyzer, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, Workspace workspace)
 {
     return(diagnostic =>
            hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, workspace, null));
 }
コード例 #4
0
ファイル: AnalyzerHelper.cs プロジェクト: jbe2277/roslyn
 public static Action <Diagnostic> GetAddExceptionDiagnosticDelegate(DiagnosticAnalyzer analyzer, AbstractHostDiagnosticUpdateSource hostDiagnosticUpdateSource, Project project)
 {
     return(diagnostic =>
            hostDiagnosticUpdateSource?.ReportAnalyzerDiagnostic(analyzer, diagnostic, project.Solution.Workspace, project));
 }