11 references to WithDocumentText
Microsoft.CodeAnalysis.EditorFeatures (1)
Shared\Preview\PreviewWorkspace.cs (1)
44var newSolution = document.Project.Solution.WithDocumentText(
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Workspaces\LspWorkspaceManager.cs (1)
431lspSolution = lspSolution.WithDocumentText(workspaceDocuments.Select(d => d.Id), _trackedDocuments[uri].Text);
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\TextExtensions.cs (2)
37solution = solution.WithDocumentText(relatedIds, text, PreservationMode.PreserveIdentity); 75return solution.WithDocumentText(allIds, text, PreservationMode.PreserveIdentity)
Microsoft.CodeAnalysis.Workspaces.UnitTests (7)
SolutionTests\SolutionTests.cs (7)
398var newSolution1 = solution.WithDocumentText([documentId], text, PreservationMode.PreserveIdentity); 402var newSolution2 = newSolution1.WithDocumentText([documentId], text, PreservationMode.PreserveIdentity); 406Assert.Same(solution, solution.WithDocumentText([null!], text)); 407Assert.Same(solution, solution.WithDocumentText([s_unrelatedDocumentId], text)); 409Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText((DocumentId[])null!, text, PreservationMode.PreserveIdentity)); 410Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText([documentId], null!, PreservationMode.PreserveIdentity)); 411Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithDocumentText([documentId], text, (PreservationMode)(-1)));