77 references to WithDocumentText
IdeCoreBenchmarks (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.Features.UnitTests (20)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (13)
249solution = solution.WithDocumentText(document1.Id, CreateText("dummy2"));
288solution = solution.WithDocumentText(document1.Id, CreateText(sourceV2));
319solution = solution.WithDocumentText(documentInfo.Id, CreateText("class UpdatedC2 {}"));
361solution = solution.WithDocumentText(document1.Id, CreateText("class E {}"));
441solution = solution.WithDocumentText(designTimeOnlyDocumentId, CreateText(sourceDesignTimeOnly2));
588solution = solution.WithDocumentText(document1.Id, CreateText("class C1 { void M() { System.Console.WriteLine(2); } }"));
825solution = solution.WithDocumentText(document1.Id, CreateText(source2));
875solution = solution.WithDocumentText(document1.Id, CreateText(source2));
975solution = solution.WithDocumentText(document1.Id, CreateText(source2));
1112solution = solution.WithDocumentText(document1.Id, CreateText(sourceV2));
1347solution = solution.WithDocumentText(document1.Id, CreateText("class C1 { void M() { "));
1387solution = solution.WithDocumentText(document1.Id, CreateText("class C1 { void M() { int i = 0L; System.Console.WriteLine(i); } }"));
1447solution = solution.WithDocumentText(documentC.Id, CreateText("class C { void M() { "));
Microsoft.CodeAnalysis.Workspaces (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (5)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Microsoft.CodeAnalysis.Workspaces.UnitTests (19)
SolutionTests\SolutionTests.cs (17)
352var newSolution1 = solution.WithDocumentText(documentId, text, PreservationMode.PreserveIdentity);
358var newSolution2 = newSolution1.WithDocumentText(documentId, text, PreservationMode.PreserveIdentity);
361Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
362Assert.Throws<ArgumentOutOfRangeException>(() => solution.WithDocumentText(documentId, text, (PreservationMode)(-1)));
364Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText((DocumentId)null!, text, PreservationMode.PreserveIdentity));
365Assert.Throws<InvalidOperationException>(() => solution.WithDocumentText(s_unrelatedDocumentId, text, PreservationMode.PreserveIdentity));
385Assert.Throws<ArgumentNullException>(() => solution.WithDocumentText(documentId, (SourceText)null!, PreservationMode.PreserveIdentity));
500TextUpdateType.SourceText => solution.WithDocumentText(documentId1, text, mode),
3978var solution2 = solution.WithDocumentText(did3, SourceText.From(text4));
4133var solution = project.Solution.WithDocumentText(documentToFreezeOriginal.Id, SourceText.From("class DocumentToFreeze { void M() { /*no top level change*/ } }"));
4178var solution = project.Solution.WithDocumentText(documentToFreezeOriginal.Id, SourceText.From("class DocumentToFreeze { void M() { } public void NewMethod() { } }"));
4366.WithDocumentText(documentId1, SourceText.From("// Document 1 Changed"))
4367.WithDocumentText(documentId2, SourceText.From("// Document 2 Changed"))
4368.WithDocumentText(documentId3, SourceText.From("// Document 3 Changed"));
5471static (sourceText, document) => document.Project.Solution.WithDocumentText(document.Id, sourceText, PreservationMode.PreserveIdentity),
5715var forkedProject1 = frozenSolution.WithDocumentText(project1.Documents.Single().Id, SourceText.From("class Doc2 { }")).GetProject(project1.Id);
5827old => old.WithDocumentText(documentId1, SourceText.From(lastContents)),
Microsoft.VisualStudio.LanguageServices (2)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
Roslyn.VisualStudio.Next.UnitTests (2)