10 references to AddDocument
Microsoft.CodeAnalysis.Features (1)
CodeRefactorings\MoveType\AbstractMoveTypeService.MoveTypeEditor.cs (1)
160var solutionWithNewDocument = projectToBeUpdated.Solution.AddDocument(
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Solution\Project.cs (1)
707return this.Solution.AddDocument(id, name, syntaxRoot, folders, filePath, preservationMode: PreservationMode.PreserveIdentity).GetDocument(id)!;
Microsoft.CodeAnalysis.Workspaces.UnitTests (8)
SolutionTests\SolutionTests.cs (8)
2476var solution2 = solution.AddDocument(documentId, "name", root, folders, filePath); 2484Assert.Throws<ArgumentNullException>("documentId", () => solution.AddDocument(documentId: null!, "name", root)); 2485Assert.Throws<ArgumentNullException>("name", () => solution.AddDocument(documentId, name: null!, root)); 2486Assert.Throws<ArgumentNullException>("syntaxRoot", () => solution.AddDocument(documentId, "name", syntaxRoot: null!)); 2487Assert.Throws<InvalidOperationException>(() => solution.AddDocument(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", syntaxRoot: root)); 2507var solution2 = solution.AddDocument(documentId, "name", root, folders, filePath); 2539var solution2 = solution.AddDocument(documentId, "name", root); 3464.AddDocument(did, "x", tree);