11 references to AddDocument
Microsoft.CodeAnalysis.EditorFeatures (1)
Interactive\InteractiveSession.cs (1)
246
solution = initProject.Solution.
AddDocument
(
Microsoft.CodeAnalysis.Workspaces.UnitTests (10)
SolutionTests\SolutionTests.cs (10)
1343
var newSolution2 = newSolution.
AddDocument
(documentId2, "e", TextLoader.From(TextAndVersion.Create(text, VersionStamp.Create(), filePath: docPath)));
2429
var solution2 = solution.
AddDocument
(documentId, "name", loader, folders);
2435
Assert.Throws<ArgumentNullException>("documentId", () => solution.
AddDocument
(documentId: null!, "name", loader));
2436
Assert.Throws<ArgumentNullException>("name", () => solution.
AddDocument
(documentId, name: null!, loader));
2437
Assert.Throws<ArgumentNullException>("loader", () => solution.
AddDocument
(documentId, "name", loader: null!));
2438
Assert.Throws<InvalidOperationException>(() => solution.
AddDocument
(documentId: DocumentId.CreateNewId(ProjectId.CreateNewId()), "name", loader));
3495
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
3544
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
3611
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
4110
.
AddDocument
(did, "x", new WorkspaceFileTextLoader(solution.Services, @"C:\doesnotexist.cs", Encoding.UTF8))