Base:
method
TryApplyChanges
Microsoft.CodeAnalysis.Workspace.TryApplyChanges(Microsoft.CodeAnalysis.Solution)
62 references to TryApplyChanges
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (27)
CodeActions\ApplyChangesOperationTests.cs (1)
244
Assert.True(workspace.
TryApplyChanges
(changedSolution));
Completion\CompletionServiceTests.cs (1)
135
Assert.True(workspace.
TryApplyChanges
(workspace.CurrentSolution.WithOptions(
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (7)
61
workspace.
TryApplyChanges
(newSolution);
90
ideEngineWorkspace.
TryApplyChanges
(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
126
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
170
workspace.
TryApplyChanges
(workspace.CurrentSolution
202
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
258
ideEngineWorkspace.
TryApplyChanges
(ideEngineWorkspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
757
Assert.True(workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences(
Formatting\CodeCleanupTests.cs (2)
832
workspace.
TryApplyChanges
(project.Solution);
937
workspace.
TryApplyChanges
(solution);
QuickInfo\DiagnosticAnalyzerQuickInfoSourceTests.cs (1)
197
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Workspaces\WorkspaceTests_EditorFeatures.cs (15)
222
workspace.
TryApplyChanges
(workspace.CurrentSolution);
752
workspace.
TryApplyChanges
(newSolution);
774
workspace.
TryApplyChanges
(newSolution);
795
workspace.
TryApplyChanges
(newSolution);
1128
workspace.
TryApplyChanges
(newSolution);
1161
workspace.
TryApplyChanges
(newSolution);
1254
workspace.
TryApplyChanges
(newSolution);
1264
workspace.
TryApplyChanges
(newSolution);
1290
workspace.
TryApplyChanges
(newSolution);
1300
workspace.
TryApplyChanges
(newSolution);
1323
workspace.
TryApplyChanges
(doc.Project.Solution);
1330
workspace.
TryApplyChanges
(project.RemoveAdditionalDocument(doc.Id).Solution);
1351
workspace.
TryApplyChanges
(doc.Project.Solution);
1358
workspace.
TryApplyChanges
(project.RemoveAnalyzerConfigDocument(doc.Id).Solution);
1489
Assert.True(workspace1.
TryApplyChanges
(newSolution));
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (1)
Diagnostics\Suppression\SuppressionTests.cs (1)
477
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Diagnostics\DiagnosticTaggerWrapper.cs (1)
37
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
CodeFixes\CodeFixServiceTests.cs (3)
50
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
341
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
1051
var appliedChanges = workspace.
TryApplyChanges
(sourceDocument.Project.Solution);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (10)
445
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
557
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
633
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
666
workspace.
TryApplyChanges
(
702
workspace.
TryApplyChanges
(
737
workspace.
TryApplyChanges
(
791
workspace.
TryApplyChanges
(
839
workspace.
TryApplyChanges
(project.Solution);
907
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
950
Assert.True(workspace.
TryApplyChanges
(workspace.CurrentSolution.Projects.Single().AddAnalyzerReference(new TestGeneratorReference(generator)).Solution));
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
57
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences(
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (1)
89
workspace.
TryApplyChanges
(newSolution);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (7)
Definitions\GoToDefinitionTests.cs (1)
368
workspace.
TryApplyChanges
(project.Solution);
Diagnostics\PullDiagnosticTests.cs (1)
1101
Assert.True(testLspServer.TestWorkspace.
TryApplyChanges
(solution));
References\FindAllReferencesHandlerTests.cs (1)
378
workspace.
TryApplyChanges
(project.Solution);
Rename\RenameTests.cs (3)
268
workspace.
TryApplyChanges
(project.Solution);
317
workspace.
TryApplyChanges
(project.Solution);
360
workspace.
TryApplyChanges
(project.Solution);
Workspaces\SourceGeneratedDocumentTests.cs (1)
301
Assert.True(testLspServer.TestWorkspace.
TryApplyChanges
(solutionWithDocumentChanged));
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (2)
CodeModel\Mocks\MockVisualStudioWorkspace.vb (2)
46
Assert.True(_workspace.
TryApplyChanges
(_workspace.CurrentSolution.WithDocumentText(documentId, newText)))
56
Assert.True(_workspace.
TryApplyChanges
(_workspace.CurrentSolution.RemoveDocument(documentId)))
Microsoft.VisualStudio.LanguageServices.UnitTests (6)
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (3)
46
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference}))
73
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference}))
210
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference}))
Venus\DocumentService_IntegrationTests.vb (3)
202
Assert.True(workspace.
TryApplyChanges
(newDocument.Project.Solution))
209
Assert.Throws(Of NotSupportedException)(Sub() workspace.
TryApplyChanges
(newDocument.Project.Solution))
227
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences({analyzerReference}))
Roslyn.VisualStudio.Next.UnitTests (3)
Services\ServiceHubServicesTests.cs (2)
1433
Contract.ThrowIfFalse(workspace.
TryApplyChanges
(workspace.CurrentSolution.WithDocumentText(normalDocId, SourceText.From("// new text"))));
1591
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
151
workspace.
TryApplyChanges
(workspace.CurrentSolution.WithAnalyzerReferences([analyzerReference]));