141 references to WorkspaceChangeKind
Microsoft.CodeAnalysis.Features (31)
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (4)
60
case
WorkspaceChangeKind
.SolutionAdded:
61
case
WorkspaceChangeKind
.SolutionCleared:
62
case
WorkspaceChangeKind
.SolutionReloaded:
63
case
WorkspaceChangeKind
.SolutionRemoved:
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerLogger.cs (3)
128
public static void LogWorkspaceEvent(CountLogAggregator<
WorkspaceChangeKind
> logAggregator,
WorkspaceChangeKind
kind)
131
public static void LogWorkCoordinatorShutdown(int correlationId, CountLogAggregator<
WorkspaceChangeKind
> logAggregator)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (22)
27
private readonly CountLogAggregator<
WorkspaceChangeKind
> _logAggregator = new();
166
case
WorkspaceChangeKind
.SolutionAdded:
170
case
WorkspaceChangeKind
.SolutionChanged:
171
case
WorkspaceChangeKind
.SolutionReloaded:
175
case
WorkspaceChangeKind
.SolutionCleared:
176
case
WorkspaceChangeKind
.SolutionRemoved:
180
case
WorkspaceChangeKind
.ProjectAdded:
185
case
WorkspaceChangeKind
.ProjectChanged:
186
case
WorkspaceChangeKind
.ProjectReloaded:
191
case
WorkspaceChangeKind
.ProjectRemoved:
196
case
WorkspaceChangeKind
.DocumentAdded:
201
case
WorkspaceChangeKind
.DocumentReloaded:
202
case
WorkspaceChangeKind
.DocumentChanged:
207
case
WorkspaceChangeKind
.DocumentRemoved:
212
case
WorkspaceChangeKind
.AdditionalDocumentAdded:
213
case
WorkspaceChangeKind
.AdditionalDocumentRemoved:
214
case
WorkspaceChangeKind
.AdditionalDocumentChanged:
215
case
WorkspaceChangeKind
.AdditionalDocumentReloaded:
216
case
WorkspaceChangeKind
.AnalyzerConfigDocumentAdded:
217
case
WorkspaceChangeKind
.AnalyzerConfigDocumentRemoved:
218
case
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged:
219
case
WorkspaceChangeKind
.AnalyzerConfigDocumentReloaded:
LegacySolutionEvents\IRemoteLegacySolutionEventsAggregationService.cs (1)
25
ValueTask 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.Features.ExternalAccess (2)
Copilot\Internal\SemanticSearch\CopilotSemanticSearchSolutionService.cs (1)
31
public (
WorkspaceChangeKind
changeKind, ProjectId? projectId, DocumentId? documentId) GetWorkspaceChangeKind(Solution oldSolution, Solution newSolution)
Copilot\SemanticSearch\ICopilotSemanticSearchSolutionService.cs (1)
12
(
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)
65
private readonly
WorkspaceChangeKind
_documentChangedWorkspaceKind;
72
WorkspaceChangeKind
documentChangedWorkspaceKind)
420
WorkspaceChangeKind
addDocumentChangeKind,
422
WorkspaceChangeKind
removeDocumentChangeKind)
435
WorkspaceChangeKind
addDocumentChangeKind,
437
WorkspaceChangeKind
removeDocumentChangeKind,
Workspace\ProjectSystem\ProjectSystemProject.cs (9)
146
documentChangedWorkspaceKind:
WorkspaceChangeKind
.DocumentChanged);
153
documentChangedWorkspaceKind:
WorkspaceChangeKind
.AdditionalDocumentChanged);
160
documentChangedWorkspaceKind:
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged);
572
WorkspaceChangeKind
.DocumentAdded,
574
WorkspaceChangeKind
.DocumentRemoved);
580
WorkspaceChangeKind
.AdditionalDocumentAdded,
582
WorkspaceChangeKind
.AdditionalDocumentRemoved);
588
WorkspaceChangeKind
.AnalyzerConfigDocumentAdded,
590
WorkspaceChangeKind
.AnalyzerConfigDocumentRemoved);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (4)
166
? (
WorkspaceChangeKind
.SolutionAdded, projectId: null, documentId: null)
167
: (
WorkspaceChangeKind
.ProjectAdded, projectId, documentId: null);
290
Workspace.SetCurrentSolution(solutionTransformation,
WorkspaceChangeKind
.ProjectChanged, projectId);
481
WorkspaceChangeKind
.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.
20
private
WorkspaceChangeKind
? _workspaceChangeKind;
27
public
WorkspaceChangeKind
WorkspaceChangeKind => _workspaceChangeKind!.Value;
32
public 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
78
public void UpdateSolutionForRemovedDocumentAction(Solution solution,
WorkspaceChangeKind
removeDocumentChangeKind, IEnumerable<DocumentId> documentIdsRemoved)
105
_workspaceChangeKind =
WorkspaceChangeKind
.ProjectChanged;
110
_workspaceChangeKind =
WorkspaceChangeKind
.SolutionChanged;
Workspace\Workspace_Editor.cs (8)
424
@this.RaiseWorkspaceChangedEventAsync(
WorkspaceChangeKind
.DocumentChanged, oldSolution, newSolution, documentId: documentId);
522
WorkspaceChangeKind
.AdditionalDocumentChanged,
539
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged,
554
WorkspaceChangeKind
workspaceChangeKind,
700
@this.RaiseWorkspaceChangedEventAsync(
WorkspaceChangeKind
.DocumentChanged, oldSolution, newSolution, documentId: documentId); // don't wait for this
722
WorkspaceChangeKind
.AdditionalDocumentChanged,
736
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged,
748
WorkspaceChangeKind
workspaceChangeKind,
Workspace\Workspace_Events.cs (1)
96
protected Task RaiseWorkspaceChangedEventAsync(
WorkspaceChangeKind
kind, Solution oldSolution, Solution newSolution, ProjectId? projectId = null, DocumentId? documentId = null)
Workspace\Workspace_SourceGeneration.cs (1)
52
static (_, _) => (
WorkspaceChangeKind
.SolutionChanged, projectId: null, documentId: null),
Workspace\Workspace.cs (48)
197
/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, ValueTuple{
WorkspaceChangeKind
, ProjectId?, DocumentId?}}, Action{Solution, Solution}?, Action{Solution, Solution}?)"/>
200
WorkspaceChangeKind
changeKind,
229
Func<Solution, Solution, (
WorkspaceChangeKind
changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind,
249
Func<Solution, Solution, (
WorkspaceChangeKind
changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind,
554
WorkspaceChangeKind
.SolutionChanged);
632
this.RaiseWorkspaceChangedEventAsync(
WorkspaceChangeKind
.SolutionCleared, oldSolution, newSolution);
770
},
WorkspaceChangeKind
.SolutionAdded);
786
},
WorkspaceChangeKind
.SolutionReloaded);
800
WorkspaceChangeKind
.SolutionRemoved,
811
WorkspaceChangeKind
.ProjectAdded, projectId: projectInfo.Id);
828
},
WorkspaceChangeKind
.ProjectReloaded, projectId);
844
WorkspaceChangeKind
.ProjectRemoved, projectId,
865
=> SetCurrentSolution(oldSolution => oldSolution.WithProjectAssemblyName(projectId, assemblyName),
WorkspaceChangeKind
.ProjectChanged, projectId);
871
=> SetCurrentSolution(oldSolution => oldSolution.WithProjectOutputFilePath(projectId, outputFilePath),
WorkspaceChangeKind
.ProjectChanged, projectId);
877
=> SetCurrentSolution(oldSolution => oldSolution.WithProjectOutputRefFilePath(projectId, outputFilePath),
WorkspaceChangeKind
.ProjectChanged, projectId);
887
=> SetCurrentSolution(oldSolution => oldSolution.WithProjectName(projectId, name).WithProjectFilePath(projectId, filePath),
WorkspaceChangeKind
.ProjectChanged, projectId);
893
=> SetCurrentSolution(oldSolution => oldSolution.WithProjectDefaultNamespace(projectId, defaultNamespace),
WorkspaceChangeKind
.ProjectChanged, projectId);
899
=> SetCurrentSolution(oldSolution => oldSolution.WithProjectCompilationOptions(projectId, options),
WorkspaceChangeKind
.ProjectChanged, projectId);
905
=> SetCurrentSolution(oldSolution => oldSolution.WithProjectParseOptions(projectId, options),
WorkspaceChangeKind
.ProjectChanged, projectId);
921
},
WorkspaceChangeKind
.ProjectChanged, projectId);
935
},
WorkspaceChangeKind
.ProjectChanged, projectId);
947
},
WorkspaceChangeKind
.ProjectChanged, projectId);
959
},
WorkspaceChangeKind
.ProjectChanged, projectId);
971
},
WorkspaceChangeKind
.ProjectChanged, projectId);
983
},
WorkspaceChangeKind
.ProjectChanged, projectId);
995
},
WorkspaceChangeKind
.SolutionChanged);
1007
},
WorkspaceChangeKind
.SolutionChanged);
1014
=> SetCurrentSolution(oldSolution => oldSolution.WithFallbackAnalyzerOptions(options),
WorkspaceChangeKind
.SolutionChanged);
1022
=> SetCurrentSolution(oldSolution => oldSolution.WithHasAllInformation(projectId, hasAllInformation),
WorkspaceChangeKind
.ProjectChanged, projectId);
1028
=> SetCurrentSolution(oldSolution => oldSolution.WithRunAnalyzers(projectId, runAnalyzers),
WorkspaceChangeKind
.ProjectChanged, projectId);
1037
WorkspaceChangeKind
.DocumentAdded, documentId: documentInfo.Id);
1053
data.@this.RaiseWorkspaceChangedEventAsync(
WorkspaceChangeKind
.ProjectChanged, oldSolution, newSolution, projectId);
1065
WorkspaceChangeKind
.DocumentReloaded, documentId: documentId);
1081
WorkspaceChangeKind
.DocumentRemoved, documentId: documentId,
1129
WorkspaceChangeKind
.DocumentInfoChanged, documentId: documentId);
1145
WorkspaceChangeKind
.DocumentChanged,
1160
WorkspaceChangeKind
.AdditionalDocumentChanged,
1175
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged,
1196
WorkspaceChangeKind
.DocumentChanged,
1211
WorkspaceChangeKind
.AdditionalDocumentChanged,
1226
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged,
1250
WorkspaceChangeKind
changeKind,
1349
WorkspaceChangeKind
.DocumentChanged, documentId: documentId,
1366
WorkspaceChangeKind
.AdditionalDocumentAdded, documentId: documentId);
1382
WorkspaceChangeKind
.AdditionalDocumentRemoved, documentId: documentId,
1405
WorkspaceChangeKind
.AnalyzerConfigDocumentAdded, documentId: documentId);
1420
WorkspaceChangeKind
.AnalyzerConfigDocumentRemoved, documentId: documentId,
1436
WorkspaceChangeKind
.SolutionChanged);
Workspace\WorkspaceChangeEventArgs.cs (15)
21
public
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>
65
public WorkspaceChangeEventArgs(
WorkspaceChangeKind
kind, Solution oldSolution, Solution newSolution, ProjectId? projectId = null, DocumentId? documentId = null)
Workspace\WorkspaceChangeKind.cs (3)
130
public static bool IsValid(this
WorkspaceChangeKind
kind)
131
=> kind is >=
WorkspaceChangeKind
.SolutionChanged and <=
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged;