Base:
method
TryApplyChanges
Microsoft.CodeAnalysis.Workspace.TryApplyChanges(Microsoft.CodeAnalysis.Solution)
63 references to TryApplyChanges
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (27)
CodeActions\ApplyChangesOperationTests.cs (1)
244Assert.True(workspace.TryApplyChanges(changedSolution));
Completion\CompletionServiceTests.cs (1)
135Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.WithOptions(
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (7)
61workspace.TryApplyChanges(newSolution); 90ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 126workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 170workspace.TryApplyChanges(workspace.CurrentSolution 202workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 258ideEngineWorkspace.TryApplyChanges(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 757Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences(
Formatting\CodeCleanupTests.cs (2)
832workspace.TryApplyChanges(project.Solution); 937workspace.TryApplyChanges(solution);
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
196workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Workspaces\WorkspaceTests_EditorFeatures.cs (15)
222workspace.TryApplyChanges(workspace.CurrentSolution); 752workspace.TryApplyChanges(newSolution); 774workspace.TryApplyChanges(newSolution); 795workspace.TryApplyChanges(newSolution); 1128workspace.TryApplyChanges(newSolution); 1161workspace.TryApplyChanges(newSolution); 1254workspace.TryApplyChanges(newSolution); 1264workspace.TryApplyChanges(newSolution); 1290workspace.TryApplyChanges(newSolution); 1300workspace.TryApplyChanges(newSolution); 1323workspace.TryApplyChanges(doc.Project.Solution); 1330workspace.TryApplyChanges(project.RemoveAdditionalDocument(doc.Id).Solution); 1351workspace.TryApplyChanges(doc.Project.Solution); 1358workspace.TryApplyChanges(project.RemoveAnalyzerConfigDocument(doc.Id).Solution); 1489Assert.True(workspace1.TryApplyChanges(newSolution));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\SuppressionTests.cs (1)
477workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Diagnostics\DiagnosticTaggerWrapper.cs (1)
37workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
CodeFixes\CodeFixServiceTests.cs (3)
51workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 342workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 1052var appliedChanges = workspace.TryApplyChanges(sourceDocument.Project.Solution);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (10)
445workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 557workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 631workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 654workspace.TryApplyChanges( 686workspace.TryApplyChanges( 717workspace.TryApplyChanges( 768workspace.TryApplyChanges( 814workspace.TryApplyChanges(project.Solution); 880workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference])); 917Assert.True(workspace.TryApplyChanges(workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(new TestGeneratorReference(generator)).Solution));
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
57workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences(
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (1)
89workspace.TryApplyChanges(newSolution);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Definitions\GoToDefinitionTests.cs (1)
368workspace.TryApplyChanges(project.Solution);
Diagnostics\PullDiagnosticTests.cs (1)
1101Assert.True(testLspServer.TestWorkspace.TryApplyChanges(solution));
References\FindAllReferencesHandlerTests.cs (1)
378workspace.TryApplyChanges(project.Solution);
Rename\RenameTests.cs (3)
268workspace.TryApplyChanges(project.Solution); 317workspace.TryApplyChanges(project.Solution); 360workspace.TryApplyChanges(project.Solution);
Workspaces\SourceGeneratedDocumentTests.cs (1)
301Assert.True(testLspServer.TestWorkspace.TryApplyChanges(solutionWithDocumentChanged));
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
1534Assert.True(workspace.TryApplyChanges(solutionWithDocumentAdded));
Roslyn.VisualStudio.Next.UnitTests (11)
Services\ServiceHubServicesTests.cs (10)
1455Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(normalDocId, SourceText.From("// new text")))); 1527Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(tempDoc.Id, SourceText.From("// new text")))); 1541Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(tempDoc.Id, SourceText.From("// more new text")))); 1611Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(tempDoc.Id, SourceText.From("// new text")))); 1622Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithProjectAnalyzerReferences(projectId, [.. project.AnalyzerReferences, new TestGeneratorReference(generator2)]))); 1633Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(tempDoc.Id, SourceText.From("// more new text")))); 1690Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(tempDoc.Id, SourceText.From("// new text")))); 1701Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithProjectAnalyzerReferences(projectId, [.. project.AnalyzerReferences, new TestGeneratorReference(generator2)]))); 1717Contract.ThrowIfFalse(workspace.TryApplyChanges(workspace.CurrentSolution.WithDocumentText(tempDoc.Id, SourceText.From("// more new text")))); 1854workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
151workspace.TryApplyChanges(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));