139 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.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)
147
documentChangedWorkspaceKind:
WorkspaceChangeKind
.DocumentChanged);
154
documentChangedWorkspaceKind:
WorkspaceChangeKind
.AdditionalDocumentChanged);
161
documentChangedWorkspaceKind:
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged);
574
WorkspaceChangeKind
.DocumentAdded,
576
WorkspaceChangeKind
.DocumentRemoved);
582
WorkspaceChangeKind
.AdditionalDocumentAdded,
584
WorkspaceChangeKind
.AdditionalDocumentRemoved);
590
WorkspaceChangeKind
.AnalyzerConfigDocumentAdded,
592
WorkspaceChangeKind
.AnalyzerConfigDocumentRemoved);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (4)
161
? (
WorkspaceChangeKind
.SolutionAdded, projectId: null, documentId: null)
162
: (
WorkspaceChangeKind
.ProjectAdded, projectId, documentId: null);
285
Workspace.SetCurrentSolution(solutionTransformation,
WorkspaceChangeKind
.ProjectChanged, projectId);
476
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.cs (48)
200
/// <inheritdoc cref="SetCurrentSolution(Func{Solution, Solution}, Func{Solution, Solution, ValueTuple{
WorkspaceChangeKind
, ProjectId?, DocumentId?}}, Action{Solution, Solution}?, Action{Solution, Solution}?)"/>
203
WorkspaceChangeKind
changeKind,
232
Func<Solution, Solution, (
WorkspaceChangeKind
changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind,
252
Func<Solution, Solution, (
WorkspaceChangeKind
changeKind, ProjectId? projectId, DocumentId? documentId)> changeKind,
557
WorkspaceChangeKind
.SolutionChanged);
635
this.RaiseWorkspaceChangedEventAsync(
WorkspaceChangeKind
.SolutionCleared, oldSolution, newSolution);
773
},
WorkspaceChangeKind
.SolutionAdded);
789
},
WorkspaceChangeKind
.SolutionReloaded);
803
WorkspaceChangeKind
.SolutionRemoved,
814
WorkspaceChangeKind
.ProjectAdded, projectId: projectInfo.Id);
831
},
WorkspaceChangeKind
.ProjectReloaded, projectId);
847
WorkspaceChangeKind
.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);
1040
WorkspaceChangeKind
.DocumentAdded, documentId: documentInfo.Id);
1056
data.@this.RaiseWorkspaceChangedEventAsync(
WorkspaceChangeKind
.ProjectChanged, oldSolution, newSolution, projectId);
1068
WorkspaceChangeKind
.DocumentReloaded, documentId: documentId);
1084
WorkspaceChangeKind
.DocumentRemoved, documentId: documentId,
1132
WorkspaceChangeKind
.DocumentInfoChanged, documentId: documentId);
1148
WorkspaceChangeKind
.DocumentChanged,
1163
WorkspaceChangeKind
.AdditionalDocumentChanged,
1178
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged,
1199
WorkspaceChangeKind
.DocumentChanged,
1214
WorkspaceChangeKind
.AdditionalDocumentChanged,
1229
WorkspaceChangeKind
.AnalyzerConfigDocumentChanged,
1253
WorkspaceChangeKind
changeKind,
1352
WorkspaceChangeKind
.DocumentChanged, documentId: documentId,
1369
WorkspaceChangeKind
.AdditionalDocumentAdded, documentId: documentId);
1385
WorkspaceChangeKind
.AdditionalDocumentRemoved, documentId: documentId,
1408
WorkspaceChangeKind
.AnalyzerConfigDocumentAdded, documentId: documentId);
1423
WorkspaceChangeKind
.AnalyzerConfigDocumentRemoved, documentId: documentId,
1439
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)
54
static (_, _) => (
WorkspaceChangeKind
.SolutionChanged, projectId: null, documentId: null),
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;