10 references to AddDocument
Microsoft.CodeAnalysis.EditorFeatures (1)
Interactive\InteractiveSession.cs (1)
248
solution = initProject.Solution.
AddDocument
(
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
SolutionTests\SolutionTests.cs (9)
2370
var solution2 = solution.
AddDocument
(documentId, "name", loader, folders);
2376
Assert.Throws<ArgumentNullException>("documentId", () => solution.
AddDocument
(documentId: null!, "name", loader));
2377
Assert.Throws<ArgumentNullException>("name", () => solution.
AddDocument
(documentId, name: null!, loader));
2378
Assert.Throws<ArgumentNullException>("loader", () => solution.
AddDocument
(documentId, "name", loader: null!));
2379
Assert.Throws<InvalidOperationException>(() => solution.
AddDocument
(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", loader));
3330
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
3379
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
3446
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
3945
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(solution.Services, @"C:\doesnotexist.cs", Encoding.UTF8))