139 references to WorkspaceChangeKind
Microsoft.CodeAnalysis.Features (31)
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (4)
60case WorkspaceChangeKind.SolutionAdded: 61case WorkspaceChangeKind.SolutionCleared: 62case WorkspaceChangeKind.SolutionReloaded: 63case WorkspaceChangeKind.SolutionRemoved:
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (3)
128public static void LogWorkspaceEvent(CountLogAggregator<WorkspaceChangeKind> logAggregator, WorkspaceChangeKind kind) 131public static void LogWorkCoordinatorShutdown(int correlationId, CountLogAggregator<WorkspaceChangeKind> logAggregator)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (22)
27private readonly CountLogAggregator<WorkspaceChangeKind> _logAggregator = new(); 166case WorkspaceChangeKind.SolutionAdded: 170case WorkspaceChangeKind.SolutionChanged: 171case WorkspaceChangeKind.SolutionReloaded: 175case WorkspaceChangeKind.SolutionCleared: 176case WorkspaceChangeKind.SolutionRemoved: 180case WorkspaceChangeKind.ProjectAdded: 185case WorkspaceChangeKind.ProjectChanged: 186case WorkspaceChangeKind.ProjectReloaded: 191case WorkspaceChangeKind.ProjectRemoved: 196case WorkspaceChangeKind.DocumentAdded: 201case WorkspaceChangeKind.DocumentReloaded: 202case WorkspaceChangeKind.DocumentChanged: 207case WorkspaceChangeKind.DocumentRemoved: 212case WorkspaceChangeKind.AdditionalDocumentAdded: 213case WorkspaceChangeKind.AdditionalDocumentRemoved: 214case WorkspaceChangeKind.AdditionalDocumentChanged: 215case WorkspaceChangeKind.AdditionalDocumentReloaded: 216case WorkspaceChangeKind.AnalyzerConfigDocumentAdded: 217case WorkspaceChangeKind.AnalyzerConfigDocumentRemoved: 218case WorkspaceChangeKind.AnalyzerConfigDocumentChanged: 219case WorkspaceChangeKind.AnalyzerConfigDocumentReloaded:
LegacySolutionEvents\IRemoteLegacySolutionEventsAggregationService.cs (1)
25ValueTask OnWorkspaceChangedAsync(Checksum oldSolutionChecksum, Checksum newSolutionChecksum, WorkspaceChangeKind kind, ProjectId? projectId, DocumentId? documentId, bool processSourceGeneratedDocuments, CancellationToken cancellationToken);
SemanticSearch\ISemanticSearchSolutionService.cs (1)
28(WorkspaceChangeKind changeKind, ProjectId? projectId, DocumentId? documentId) GetWorkspaceChangeKind(Solution oldSolution, Solution newSolution);
Microsoft.CodeAnalysis.Workspaces (108)
Workspace\ISolutionAnalyzerSetterWorkspaceService.cs (1)
33=> workspace.SetCurrentSolution(s => s.WithAnalyzerReferences(references), WorkspaceChangeKind.SolutionChanged);
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (6)
65private readonly WorkspaceChangeKind _documentChangedWorkspaceKind; 72WorkspaceChangeKind documentChangedWorkspaceKind) 420WorkspaceChangeKind addDocumentChangeKind, 422WorkspaceChangeKind removeDocumentChangeKind) 435WorkspaceChangeKind addDocumentChangeKind, 437WorkspaceChangeKind removeDocumentChangeKind,
Workspace\ProjectSystem\ProjectSystemProject.cs (9)
147documentChangedWorkspaceKind: WorkspaceChangeKind.DocumentChanged); 154documentChangedWorkspaceKind: WorkspaceChangeKind.AdditionalDocumentChanged); 161documentChangedWorkspaceKind: WorkspaceChangeKind.AnalyzerConfigDocumentChanged); 574WorkspaceChangeKind.DocumentAdded, 576WorkspaceChangeKind.DocumentRemoved); 582WorkspaceChangeKind.AdditionalDocumentAdded, 584WorkspaceChangeKind.AdditionalDocumentRemoved); 590WorkspaceChangeKind.AnalyzerConfigDocumentAdded, 592WorkspaceChangeKind.AnalyzerConfigDocumentRemoved);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (4)
161? (WorkspaceChangeKind.SolutionAdded, projectId: null, documentId: null) 162: (WorkspaceChangeKind.ProjectAdded, projectId, documentId: null); 285Workspace.SetCurrentSolution(solutionTransformation, WorkspaceChangeKind.ProjectChanged, projectId); 476WorkspaceChangeKind.SolutionRemoved,
Workspace\ProjectSystem\SolutionChangeAccumulator.cs (12)
11/// keeps track of the right <see cref="CodeAnalysis.WorkspaceChangeKind"/> to raise when we are done. 17/// and <see cref="WorkspaceChangeKind.ProjectChanged"/> or 18/// <see cref="WorkspaceChangeKind.SolutionChanged"/> if we can't give a more precise type. 20private WorkspaceChangeKind? _workspaceChangeKind; 27public WorkspaceChangeKind WorkspaceChangeKind => _workspaceChangeKind!.Value; 32public void UpdateSolutionForDocumentAction(Solution newSolution, WorkspaceChangeKind changeKind, IEnumerable<DocumentId> documentIds) 58_workspaceChangeKind = WorkspaceChangeKind.ProjectChanged; 65_workspaceChangeKind = WorkspaceChangeKind.SolutionChanged; 75/// The same as <see cref="UpdateSolutionForDocumentAction(Solution, WorkspaceChangeKind, IEnumerable{DocumentId})" /> but also records 78public void UpdateSolutionForRemovedDocumentAction(Solution solution, WorkspaceChangeKind removeDocumentChangeKind, IEnumerable<DocumentId> documentIdsRemoved) 105_workspaceChangeKind = WorkspaceChangeKind.ProjectChanged; 110_workspaceChangeKind = WorkspaceChangeKind.SolutionChanged;
Workspace\Workspace.cs (48)
200/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, ValueTuple{WorkspaceChangeKind, ProjectId?, DocumentId?}}, Action{Solution, Solution}?, Action{Solution, Solution}?)"/> 203WorkspaceChangeKind changeKind, 232Func<Solution, Solution, (WorkspaceChangeKind changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind, 252Func<Solution, Solution, (WorkspaceChangeKind changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind, 557WorkspaceChangeKind.SolutionChanged); 635this.RaiseWorkspaceChangedEventAsync(WorkspaceChangeKind.SolutionCleared, oldSolution, newSolution); 773}, WorkspaceChangeKind.SolutionAdded); 789}, WorkspaceChangeKind.SolutionReloaded); 803WorkspaceChangeKind.SolutionRemoved, 814WorkspaceChangeKind.ProjectAdded, projectId: projectInfo.Id); 831}, WorkspaceChangeKind.ProjectReloaded, projectId); 847WorkspaceChangeKind.ProjectRemoved, projectId, 868=> SetCurrentSolution(oldSolution => oldSolution.WithProjectAssemblyName(projectId, assemblyName), WorkspaceChangeKind.ProjectChanged, projectId); 874=> SetCurrentSolution(oldSolution => oldSolution.WithProjectOutputFilePath(projectId, outputFilePath), WorkspaceChangeKind.ProjectChanged, projectId); 880=> SetCurrentSolution(oldSolution => oldSolution.WithProjectOutputRefFilePath(projectId, outputFilePath), WorkspaceChangeKind.ProjectChanged, projectId); 890=> SetCurrentSolution(oldSolution => oldSolution.WithProjectName(projectId, name).WithProjectFilePath(projectId, filePath), WorkspaceChangeKind.ProjectChanged, projectId); 896=> SetCurrentSolution(oldSolution => oldSolution.WithProjectDefaultNamespace(projectId, defaultNamespace), WorkspaceChangeKind.ProjectChanged, projectId); 902=> SetCurrentSolution(oldSolution => oldSolution.WithProjectCompilationOptions(projectId, options), WorkspaceChangeKind.ProjectChanged, projectId); 908=> SetCurrentSolution(oldSolution => oldSolution.WithProjectParseOptions(projectId, options), WorkspaceChangeKind.ProjectChanged, projectId); 924}, WorkspaceChangeKind.ProjectChanged, projectId); 938}, WorkspaceChangeKind.ProjectChanged, projectId); 950}, WorkspaceChangeKind.ProjectChanged, projectId); 962}, WorkspaceChangeKind.ProjectChanged, projectId); 974}, WorkspaceChangeKind.ProjectChanged, projectId); 986}, WorkspaceChangeKind.ProjectChanged, projectId); 998}, WorkspaceChangeKind.SolutionChanged); 1010}, WorkspaceChangeKind.SolutionChanged); 1017=> SetCurrentSolution(oldSolution => oldSolution.WithFallbackAnalyzerOptions(options), WorkspaceChangeKind.SolutionChanged); 1025=> SetCurrentSolution(oldSolution => oldSolution.WithHasAllInformation(projectId, hasAllInformation), WorkspaceChangeKind.ProjectChanged, projectId); 1031=> SetCurrentSolution(oldSolution => oldSolution.WithRunAnalyzers(projectId, runAnalyzers), WorkspaceChangeKind.ProjectChanged, projectId); 1040WorkspaceChangeKind.DocumentAdded, documentId: documentInfo.Id); 1056data.@this.RaiseWorkspaceChangedEventAsync(WorkspaceChangeKind.ProjectChanged, oldSolution, newSolution, projectId); 1068WorkspaceChangeKind.DocumentReloaded, documentId: documentId); 1084WorkspaceChangeKind.DocumentRemoved, documentId: documentId, 1132WorkspaceChangeKind.DocumentInfoChanged, documentId: documentId); 1148WorkspaceChangeKind.DocumentChanged, 1163WorkspaceChangeKind.AdditionalDocumentChanged, 1178WorkspaceChangeKind.AnalyzerConfigDocumentChanged, 1199WorkspaceChangeKind.DocumentChanged, 1214WorkspaceChangeKind.AdditionalDocumentChanged, 1229WorkspaceChangeKind.AnalyzerConfigDocumentChanged, 1253WorkspaceChangeKind changeKind, 1352WorkspaceChangeKind.DocumentChanged, documentId: documentId, 1369WorkspaceChangeKind.AdditionalDocumentAdded, documentId: documentId); 1385WorkspaceChangeKind.AdditionalDocumentRemoved, documentId: documentId, 1408WorkspaceChangeKind.AnalyzerConfigDocumentAdded, documentId: documentId); 1423WorkspaceChangeKind.AnalyzerConfigDocumentRemoved, documentId: documentId, 1439WorkspaceChangeKind.SolutionChanged);
Workspace\Workspace_Editor.cs (8)
424@this.RaiseWorkspaceChangedEventAsync(WorkspaceChangeKind.DocumentChanged, oldSolution, newSolution, documentId: documentId); 522WorkspaceChangeKind.AdditionalDocumentChanged, 539WorkspaceChangeKind.AnalyzerConfigDocumentChanged, 554WorkspaceChangeKind workspaceChangeKind, 700@this.RaiseWorkspaceChangedEventAsync(WorkspaceChangeKind.DocumentChanged, oldSolution, newSolution, documentId: documentId); // don't wait for this 722WorkspaceChangeKind.AdditionalDocumentChanged, 736WorkspaceChangeKind.AnalyzerConfigDocumentChanged, 748WorkspaceChangeKind workspaceChangeKind,
Workspace\Workspace_Events.cs (1)
96protected Task RaiseWorkspaceChangedEventAsync(WorkspaceChangeKind kind, Solution oldSolution, Solution newSolution, ProjectId? projectId = null, DocumentId? documentId = null)
Workspace\Workspace_SourceGeneration.cs (1)
54static (_, _) => (WorkspaceChangeKind.SolutionChanged, projectId: null, documentId: null),
Workspace\WorkspaceChangeEventArgs.cs (15)
21public WorkspaceChangeKind Kind { get; } 26/// <see cref="WorkspaceChangeKind.SolutionAdded"/> replaces the previous solution, which might be the empty 33/// and <see cref="NewSolution"/>. Note <see cref="WorkspaceChangeKind.SolutionRemoved"/> replaces the previous 40/// to a project (for example <see cref="WorkspaceChangeKind.SolutionReloaded"/>. Should be non-<see 43/// <item><see cref="WorkspaceChangeKind.ProjectAdded"/></item> 44/// <item><see cref="WorkspaceChangeKind.ProjectChanged"/></item> 45/// <item><see cref="WorkspaceChangeKind.ProjectReloaded"/></item> 46/// <item><see cref="WorkspaceChangeKind.ProjectRemoved"/></item> 53/// to a document (for example <see cref="WorkspaceChangeKind.ProjectAdded"/>. Should be non-<see 56/// <item><see cref="WorkspaceChangeKind.DocumentAdded"/></item> 57/// <item><see cref="WorkspaceChangeKind.DocumentChanged"/></item> 58/// <item><see cref="WorkspaceChangeKind.DocumentInfoChanged"/></item> 59/// <item><see cref="WorkspaceChangeKind.DocumentReloaded"/></item> 60/// <item><see cref="WorkspaceChangeKind.DocumentRemoved"/></item> 65public WorkspaceChangeEventArgs(WorkspaceChangeKind kind, Solution oldSolution, Solution newSolution, ProjectId? projectId = null, DocumentId? documentId = null)
Workspace\WorkspaceChangeKind.cs (3)
130public static bool IsValid(this WorkspaceChangeKind kind) 131=> kind is >= WorkspaceChangeKind.SolutionChanged and <= WorkspaceChangeKind.AnalyzerConfigDocumentChanged;