35 instantiations of ApplyChangesOperation
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
NamingStyleCodeFixProvider.cs (2)
156new ApplyChangesOperation(await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false))); 161var codeAction = new ApplyChangesOperation(newSolution);
Microsoft.CodeAnalysis.CSharp.Features (2)
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.cs (1)
276return new CodeActionOperation[] { new ApplyChangesOperation(changedSolution) };
CodeRefactorings\EnableNullable\EnableNullableCodeRefactoringProvider.FixAllProvider.cs (1)
75return new CodeActionOperation[] { new ApplyChangesOperation(changedSolution) };
Microsoft.CodeAnalysis.EditorFeatures (1)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
78(CodeActionOperation)new ApplyChangesOperation(solutionSet.RenamedSolution));
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
FixAllGetFixesService.cs (1)
236result.Add(new ApplyChangesOperation(newSolution));
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Suggestions\FixAll\FixAllGetFixesService.cs (1)
236result.Add(new ApplyChangesOperation(newSolution));
Microsoft.CodeAnalysis.Features (23)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (2)
45var operation = new ApplyChangesOperation(newProject.Solution); 107return new ApplyChangesOperation(newProject.Solution);
AddImport\CodeActions\MetadataSymbolReferenceCodeAction.cs (1)
35return Task.FromResult<CodeActionOperation?>(new ApplyChangesOperation(project.AddMetadataReference(reference).Solution));
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (1)
47var applyOperation = new ApplyChangesOperation(projectWithAddedReference.Solution);
AddImport\CodeActions\SymbolReference.SymbolReferenceCodeAction.cs (1)
63return updatedProject ?? new ApplyChangesOperation(updatedDocument.Project.Solution);
AddMissingReference\AddMissingReferenceCodeAction.cs (1)
90new ApplyChangesOperation(_project.AddProjectReference(_projectReferenceToAdd).Solution)));
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
35new ApplyChangesOperation(changedSuppressionDocument.Project.Solution),
CodeRefactorings\MoveType\AbstractMoveTypeService.Editor.cs (1)
53return ImmutableArray.Create<CodeActionOperation>(new ApplyChangesOperation(solution));
CodeRefactorings\MoveType\AbstractMoveTypeService.RenameFileEditor.cs (1)
44new ApplyChangesOperation(newSolution));
CodeRefactorings\SyncNamespace\AbstractSyncNamespaceCodeRefactoringProvider.MoveFileCodeAction.cs (1)
54new ApplyChangesOperation(solution),
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
146return new[] { new ApplyChangesOperation(finalSolution) };
ExtractInterface\ExtractInterfaceCodeAction.cs (1)
52new ApplyChangesOperation(extractInterfaceResult.UpdatedSolution),
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
95new ApplyChangesOperation(newDocument.Project.Solution),
GenerateType\AbstractGenerateTypeService.Editor.cs (4)
376return new CodeActionOperation[] { new ApplyChangesOperation(updatedSolution), new OpenDocumentOperation(documentId) }; 407return new CodeActionOperation[] { new ApplyChangesOperation(codeGenResult.Project.Solution) }; 471return new CodeActionOperation[] { new ApplyChangesOperation(updatedSolution) }; 572return new CodeActionOperation[] { new ApplyChangesOperation(codeGenResult.Project.Solution) };
MoveStaticMembers\MoveStaticMembersWithDialogCodeAction.cs (2)
91return new CodeActionOperation[] { new ApplyChangesOperation(fixedSolution) }; 144return new CodeActionOperation[] { new ApplyChangesOperation(movedSolution) };
MoveToNamespace\AbstractMoveToNamespaceCodeAction.cs (1)
76operations.Add(new ApplyChangesOperation(moveToNamespaceResult.UpdatedSolution));
NamingStyleCodeFixProvider.cs (2)
156new ApplyChangesOperation(await _createChangedSolutionAsync(cancellationToken).ConfigureAwait(false))); 161var codeAction = new ApplyChangesOperation(newSolution);
PullMemberUp\Dialog\PullMemberUpWithDialogCodeAction.cs (1)
53return new[] { new ApplyChangesOperation(changedSolution) };
Microsoft.CodeAnalysis.Workspaces (2)
CodeActions\CodeAction.cs (2)
193return new CodeActionOperation[] { new ApplyChangesOperation(changedSolution) }; 279result.Add(new ApplyChangesOperation(await this.PostProcessChangesAsync(originalSolution, ac.ChangedSolution, cancellationToken).ConfigureAwait(false)));
Microsoft.VisualStudio.LanguageServices (2)
TableDataSource\Suppression\VisualStudioDiagnosticListTableCommandHandler.cs (1)
205var operations = ImmutableArray.Create<CodeActionOperation>(new ApplyChangesOperation(newSolution));
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (1)
391var operations = ImmutableArray.Create<CodeActionOperation>(new ApplyChangesOperation(newSolution));
Microsoft.VisualStudio.LanguageServices.Implementation (1)
SolutionExplorer\AnalyzersCommandHandler.cs (1)
466var operations = ImmutableArray.Create<CodeActionOperation>(new ApplyChangesOperation(newSolution));
42 references to ApplyChangesOperation
AnalyzerRunner (1)
CodeRefactoringRunner.cs (1)
99if (operation is not ApplyChangesOperation applyChangesOperation)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
NamingStyleCodeFixProvider.cs (1)
161var codeAction = new ApplyChangesOperation(newSolution);
Microsoft.CodeAnalysis.CodeStyle.LegacyTestFramework.UnitTestUtilities (1)
AbstractCodeActionOrUserDiagnosticTest.cs (1)
770if (operation is ApplyChangesOperation applyChangesOperation && result == null)
Microsoft.CodeAnalysis.EditorFeatures (4)
CodeActions\CodeActionEditHandlerService.cs (4)
64if (op is ApplyChangesOperation applyChanges) 190var updatedSolution = operations.OfType<ApplyChangesOperation>().FirstOrDefault()?.ChangedSolution ?? oldSolution; 203if (operationsList.Single() is not ApplyChangesOperation applyOperation) 283if (operation is ApplyChangesOperation)
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (1)
FixAllGetFixesService.cs (1)
233if (operation is ApplyChangesOperation)
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (5)
CodeActions\AbstractCodeActionOrUserDiagnosticTest.cs (1)
770if (operation is ApplyChangesOperation applyChangesOperation && result == null)
CodeActions\AbstractCodeActionTest.cs (2)
133var applyChangesOperation = operations.OfType<ApplyChangesOperation>().First();
Diagnostics\AbstractSuppressionAllCodeTests.cs (2)
113var applyChangesOperation = operations.OfType<ApplyChangesOperation>().Single();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Suggestions\FixAll\FixAllGetFixesService.cs (1)
233if (operation is ApplyChangesOperation)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (2)
208Dim edit = operations.OfType(Of ApplyChangesOperation)().First() 228Dim edit = operations.OfType(Of ApplyChangesOperation)().FirstOrDefault()
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
53Dim edit = operations.OfType(Of ApplyChangesOperation)().First()
Microsoft.CodeAnalysis.Features (15)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (4)
45var operation = new ApplyChangesOperation(newProject.Solution); 79var operation = GetApplyChangesOperation(workspace); 89var operation = GetApplyChangesOperation(workspace); 96private ApplyChangesOperation? GetApplyChangesOperation(Workspace workspace)
AddImport\CodeActions\ProjectSymbolReferenceCodeAction.cs (3)
47var applyOperation = new ApplyChangesOperation(projectWithAddedReference.Solution); 60private readonly ApplyChangesOperation _applyOperation; 62public AddProjectReferenceCodeActionOperation(ProjectId referencingProject, ProjectId referencedProject, ApplyChangesOperation applyOperation)
ChangeSignature\ChangeSignatureCodeActionOperation.cs (2)
17/// This is used instead of <see cref="ApplyChangesOperation"/> as we need to show a confirmation 54return ApplyChangesOperation.ApplyOrMergeChanges(workspace, originalSolution, ChangedSolution, progressTracker, cancellationToken);
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
222else if (operations is [ApplyChangesOperation applyChangesOperation])
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (2)
113var applyChangesOperation = operations.OfType<ApplyChangesOperation>().SingleOrDefault();
NamingStyleCodeFixProvider.cs (1)
161var codeAction = new ApplyChangesOperation(newSolution);
SyncNamespaces\AbstractSyncNamespacesService.cs (2)
145var applyChangesOperation = operations.OfType<ApplyChangesOperation>().SingleOrDefault();
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\CodeActions\CodeActionResolveHandler.cs (1)
103if (option is not ApplyChangesOperation applyChangesOperation)
Microsoft.CodeAnalysis.Workspaces (9)
CodeActions\CodeAction.cs (3)
262/// Apply post processing steps to any <see cref="ApplyChangesOperation"/>'s. 266/// <returns>A new list of operations with post processing steps applied to any <see cref="ApplyChangesOperation"/>'s.</returns> 277if (op is ApplyChangesOperation ac)
CodeActions\Operations\ApplyChangesOperation.cs (5)
23/// <see cref="ApplyChangesOperation"/>. Hosts may provide custom handling for 24/// <see cref="ApplyChangesOperation"/>s, but if a <see cref="CodeAction"/> requires custom 25/// host behavior not supported by a single <see cref="ApplyChangesOperation"/>, then instead: 28/// <description><text>Do not return any <see cref="ApplyChangesOperation"/> from <see cref="CodeAction.GetOperationsAsync(CancellationToken)"/></text></description> 32/// 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