15 instantiations of ApplyChangesOperation
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (2)
151=> [new ApplyChangesOperation(await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false))]; 156var codeAction = new ApplyChangesOperation(newSolution);
Microsoft.CodeAnalysis.Features (13)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (2)
46var operation = new ApplyChangesOperation(newProject.Solution); 101return new ApplyChangesOperation(newProject.Solution);
AddImport\CodeActions\MetadataSymbolReferenceCodeAction.cs (1)
35return Task.FromResult<CodeActionOperation?>(new ApplyChangesOperation(project.AddMetadataReference(reference).Solution));
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (1)
46var applyOperation = new ApplyChangesOperation(projectWithAddedReference.Solution);
AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs (1)
58return updatedProject ?? new ApplyChangesOperation(updatedDocument.Project.Solution);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
37new ApplyChangesOperation(changedSuppressionDocument.Project.Solution),
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (1)
214result.Add(new ApplyChangesOperation(newSolution));
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
48return [new ApplyChangesOperation(solution), new OpenDocumentOperation(newDocumentId, activateIfAlreadyOpen: true)];
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
370return [new ApplyChangesOperation(updatedSolution), new OpenDocumentOperation(documentId)];
MoveToNamespace\MoveToNamespaceCodeAction.cs (1)
65operations.Add(new ApplyChangesOperation(moveToNamespaceResult.UpdatedSolution));
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
44return new[] { new ApplyChangesOperation(changedSolution) };
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (2)
151=> [new ApplyChangesOperation(await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false))]; 156var codeAction = new ApplyChangesOperation(newSolution);
47 references to ApplyChangesOperation
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
98if (operation is not ApplyChangesOperation applyChangesOperation)
Microsoft.Analyzers.Extra.Tests (2)
Resources\RoslynTestUtils.cs (2)
362var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution; 456var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Analyzers.Local.Tests (2)
Resources\RoslynTestUtils.cs (2)
363var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution; 457var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.AspNetCore.Analyzer.Testing (1)
CodeFixRunner.cs (1)
64return Assert.Single(operations.OfType<ApplyChangesOperation>()).ChangedSolution;
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\CodeFixVerifier.Helper.cs (1)
29var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\CodeFixVerifier.Helper.cs (1)
29var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
156var codeAction = new ApplyChangesOperation(newSolution);
Microsoft.CodeAnalysis.EditorFeatures (4)
CodeActions\CodeActionEditHandlerService.cs (4)
54if (op is ApplyChangesOperation applyChanges) 180var updatedSolution = operations.OfType<ApplyChangesOperation>().FirstOrDefault()?.ChangedSolution ?? oldSolution; 193if (operationsList.Single() is not ApplyChangesOperation applyOperation) 273if (operation is ApplyChangesOperation)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
207Dim edit = operations.OfType(Of ApplyChangesOperation)().First() 227Dim edit = operations.OfType(Of ApplyChangesOperation)().FirstOrDefault()
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
51Dim edit = operations.OfType(Of ApplyChangesOperation)().First()
Microsoft.CodeAnalysis.Features (16)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (4)
46var operation = new ApplyChangesOperation(newProject.Solution); 73var operation = GetApplyChangesOperation(workspace); 83var operation = GetApplyChangesOperation(workspace); 90private ApplyChangesOperation? GetApplyChangesOperation(Workspace workspace)
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (3)
46var applyOperation = new ApplyChangesOperation(projectWithAddedReference.Solution); 55private sealed class AddProjectReferenceCodeActionOperation(ProjectId referencingProject, ProjectId referencedProject, ApplyChangesOperation applyOperation) : CodeActionOperation 59private readonly ApplyChangesOperation _applyOperation = applyOperation;
ChangeSignature\ChangeSignatureCodeActionOperation.cs (2)
16/// This is used instead of <see cref="ApplyChangesOperation"/> as we need to show a confirmation 47return ApplyChangesOperation.ApplyOrMergeChanges(workspace, originalSolution, ChangedSolution, progressTracker, cancellationToken);
CodeFixesAndRefactorings\AbstractFixAllGetFixesService.cs (1)
211if (operation is ApplyChangesOperation)
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
230else if (operations is [ApplyChangesOperation applyChangesOperation])
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (2)
116var applyChangesOperation = operations.OfType<ApplyChangesOperation>().SingleOrDefault();
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
156var codeAction = new ApplyChangesOperation(newSolution);
SyncNamespaces\AbstractSyncNamespacesService.cs (2)
146var applyChangesOperation = operations.OfType<ApplyChangesOperation>().SingleOrDefault();
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\CodeActions\CodeActionResolveHelper.cs (1)
57if (option is not ApplyChangesOperation applyChangesOperation)
Microsoft.CodeAnalysis.Workspaces (9)
CodeActions\CodeAction.cs (3)
415/// Apply post processing steps to any <see cref="ApplyChangesOperation"/>'s. 419/// <returns>A new list of operations with post processing steps applied to any <see cref="ApplyChangesOperation"/>'s.</returns> 432if (op is ApplyChangesOperation ac)
CodeActions\Operations\ApplyChangesOperation.cs (5)
20/// <see cref="ApplyChangesOperation"/>. Hosts may provide custom handling for 21/// <see cref="ApplyChangesOperation"/>s, but if a <see cref="CodeAction"/> requires custom 22/// host behavior not supported by a single <see cref="ApplyChangesOperation"/>, then instead: 25/// <description><text>Do not return any <see cref="ApplyChangesOperation"/> from <see cref="CodeAction.GetOperationsAsync(CancellationToken)"/></text></description> 29/// by creating a custom <see cref="PreviewOperation"/> or returning a single <see cref="ApplyChangesOperation"/>
CodeFixes\FixAllOccurrences\WellKnownFixAllProviders.cs (1)
24/// <see cref="ApplyChangesOperation"/> present within the individual diagnostic fixes. Other types of
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
497var solution = operations.OfType<ApplyChangesOperation>().Single().ChangedSolution;