private void RaiseDiagnosticsUpdatedForProject(ProjectId projectId, object key, IEnumerable<DiagnosticData> items)
        {
            var args = new DiagnosticsUpdatedArgs(
                id: Tuple.Create(this, projectId, key),
                workspace: _workspace,
                solution: null,
                projectId: projectId,
                documentId: null,
                diagnostics: items.AsImmutableOrEmpty());

            RaiseDiagnosticsUpdated(args);
        }
        private void RaiseDiagnosticsCreatedForProject(ProjectId projectId, object key, IEnumerable<DiagnosticData> items)
        {
            var args = DiagnosticsUpdatedArgs.DiagnosticsCreated(
                CreateId(projectId, key),
                _workspace,
                solution: null,
                projectId: projectId,
                documentId: null,
                diagnostics: items.AsImmutableOrEmpty());

            RaiseDiagnosticsUpdated(args);
        }
Example #3
0
        /// <summary>
        /// Creates a top level code action with multiple code action choices a user can invoke.
        /// </summary>
        public static CodeAction Create(string title, IEnumerable<CodeAction> nestedActions, string equivalenceKey = null)
        {
            if (title == null)
            {
                throw new ArgumentNullException(nameof(title));
            }

            return new SimpleCodeAction(title, nestedActions.AsImmutableOrEmpty(), equivalenceKey);
        }
Example #4
0
 public SuppressionCodeAction(Diagnostic diagnostic, IEnumerable<CodeAction> nestedActions)
     : base(string.Format(FeaturesResources.Suppress_0, diagnostic.Id), nestedActions.AsImmutableOrEmpty())
 {
 }
Example #5
0
 public SuppressionCodeAction(Diagnostic diagnostic, IEnumerable<CodeAction> nestedActions)
     : base(string.Format(FeaturesResources.SuppressionCodeActionTitle, diagnostic.Id), nestedActions.AsImmutableOrEmpty(), ComputeEquivalenceKey(nestedActions))
 {
 }