Esempio n. 1
0
 public DiagnosticsUpdatedEventArgs(object tag, ISourceFile associatedFile, DiagnosticsUpdatedKind kind, ImmutableArray <Diagnostic> diagnostics, SyntaxHighlightDataList diagnosticHighlights = null)
 {
     Tag = tag;
     AssociatedSourceFile = associatedFile;
     Kind                 = kind;
     Diagnostics          = diagnostics;
     DiagnosticHighlights = diagnosticHighlights;
 }
Esempio n. 2
0
 public DiagnosticsUpdatedEventArgs(object tag, string filePath, DiagnosticsUpdatedKind kind, DiagnosticSourceKind source, ImmutableArray <Diagnostic> diagnostics, SyntaxHighlightDataList diagnosticHighlights = null)
 {
     Tag                  = tag;
     FilePath             = filePath;
     Kind                 = kind;
     Diagnostics          = diagnostics;
     DiagnosticHighlights = diagnosticHighlights;
     Source               = source;
 }
Esempio n. 3
0
        private DiagnosticsUpdatedArgs(
            object id,
            Workspace workspace,
            Solution?solution,
            ProjectId?projectId,
            DocumentId?documentId,
            ImmutableArray <DiagnosticData> diagnostics,
            DiagnosticsUpdatedKind kind
            ) : base(id, workspace, projectId, documentId)
        {
            // TODO: This assert fails for EditAndContinueDiagnosticUpdateSource. See https://github.com/dotnet/roslyn/issues/36246.
            // Debug.Assert(diagnostics.All(d => d.ProjectId == projectId && d.DocumentId == documentId));

            Debug.Assert(kind != DiagnosticsUpdatedKind.DiagnosticsRemoved || diagnostics.IsEmpty);

            Solution     = solution;
            Kind         = kind;
            _diagnostics = diagnostics;
        }
Esempio n. 4
0
        private DiagnosticsUpdatedArgs(
            object id,
            Workspace workspace,
            Solution solution,
            ProjectId projectId,
            DocumentId documentId,
            ImmutableArray <DiagnosticData> diagnostics,
            DiagnosticsUpdatedKind kind)
            : base(id, workspace, projectId, documentId)
        {
            Solution    = solution;
            Diagnostics = diagnostics;
            Kind        = kind;

            if (kind == DiagnosticsUpdatedKind.DiagnosticsRemoved)
            {
                Debug.Assert(diagnostics.IsEmpty);
            }
        }
Esempio n. 5
0
        private DiagnosticsUpdatedArgs(
            object id,
            Workspace workspace,
            Solution solution,
            ProjectId projectId,
            DocumentId documentId,
            ImmutableArray<DiagnosticData> diagnostics,
            DiagnosticsUpdatedKind kind)
                : base(id, workspace, projectId, documentId)
        {
            Solution = solution;
            Diagnostics = diagnostics;
            Kind = kind;

            if (kind == DiagnosticsUpdatedKind.DiagnosticsRemoved)
            {
                Debug.Assert(diagnostics.IsEmpty);
            }
        }
Esempio n. 6
0
 public DiagnosticsUpdatedEventArgs(object tag, DiagnosticsUpdatedKind kind)
 {
     Tag    = tag;
     Kind   = kind;
     Source = DiagnosticSourceKind.Misc;
 }