60 references to Id
Microsoft.CodeAnalysis.Features.UnitTests (3)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (3)
278solution = solution.WithDocumentText(documentInfo.Id, CreateText("class UpdatedC2 {}")); 279var document2 = solution.GetDocument(documentInfo.Id); 319var document1 = solution.GetDocument(documentInfo.Id);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Workspaces\LspMiscellaneousFilesWorkspace.cs (1)
67var id = projectInfo.Documents.Single().Id;
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
453var project = this.CurrentSolution.GetRequiredProject(info.Id.ProjectId); 483this.SaveDocumentText(info.Id, fullPath, text, text.Encoding ?? Encoding.UTF8);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (7)
Workspaces\TestWorkspace`1.cs (7)
393var hostProject = this.GetTestProject(info.Id.ProjectId); 398info.Id, info.FilePath, info.Folders, ExportProvider, 419var hostProject = this.GetTestProject(info.Id.ProjectId); 422var hostDocument = CreateDocument(text.ToString(), info.Name, id: info.Id, exportProvider: ExportProvider); 443var hostProject = this.GetTestProject(info.Id.ProjectId); 446var hostDocument = CreateDocument(text.ToString(), info.Name, id: info.Id, filePath: info.FilePath, folders: info.Folders, exportProvider: ExportProvider); 554var documentId = documentInfo.Id;
Microsoft.CodeAnalysis.Workspaces.UnitTests (33)
SolutionTests\DocumentInfoTests.cs (3)
43Assert.Equal(id, info.Id); 62Assert.Equal(id, info.Id); 109SolutionTestHelpers.TestProperty(instance, (old, value) => old.WithId(value), opt => opt.Id, documentId, defaultThrows: true);
SolutionTests\SolutionTests.cs (12)
2478var document1 = project.GetDocument(documentInfo1.Id); 2479var document2 = project.GetDocument(documentInfo2.Id); 2504var document1 = project1.GetDocument(documentInfo1.Id); 2505var document2 = project2.GetDocument(documentInfo2.Id); 2552solution = solution.RemoveDocuments(ImmutableArray.Create(documentInfo1.Id, documentInfo2.Id)); 2576solution = solution.RemoveDocuments(ImmutableArray.Create(documentInfo1.Id, documentInfo2.Id)); 2597Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveDocuments(ImmutableArray.Create(documentInfo1.Id))); 2616Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAdditionalDocuments(ImmutableArray.Create(documentInfo1.Id))); 2635Assert.Throws<ArgumentException>(() => solution.GetProject(projectId2).RemoveAnalyzerConfigDocuments(ImmutableArray.Create(documentInfo1.Id))); 5290var doc = solution.GetDocument(docInfo.Id);
WorkspaceTests\AdhocWorkspaceTests.cs (17)
62Assert.Equal(ws.CurrentSolution.GetDocument(info.Id), doc); 226var doc = ws.CurrentSolution.GetDocument(docInfo.Id); 229ws.OpenDocument(docInfo.Id); 231doc = ws.CurrentSolution.GetDocument(docInfo.Id); 237ws.CloseDocument(docInfo.Id); 239doc = ws.CurrentSolution.GetDocument(docInfo.Id); 260var doc = ws.CurrentSolution.GetAdditionalDocument(docInfo.Id); 263ws.OpenAdditionalDocument(docInfo.Id); 265doc = ws.CurrentSolution.GetAdditionalDocument(docInfo.Id); 271ws.CloseAdditionalDocument(docInfo.Id); 273doc = ws.CurrentSolution.GetAdditionalDocument(docInfo.Id); 299var doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id); 302ws.OpenAnalyzerConfigDocument(docInfo.Id); 304doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id); 310ws.CloseAnalyzerConfigDocument(docInfo.Id); 312doc = ws.CurrentSolution.GetAnalyzerConfigDocument(docInfo.Id); 333var doc = ws.CurrentSolution.GetDocument(docInfo.Id);
WorkspaceTests\WorkspaceTests.cs (1)
182return this.CurrentSolution.GetDocument(documentInfo.Id);
Microsoft.VisualStudio.LanguageServices (13)
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
280OnDocumentOpened(projectInfo.Documents.Single().Id, sourceTextContainer);
ProjectSystem\VisualStudioWorkspaceImpl.AbstractAddDocumentUndoUnit.cs (1)
22: base(workspace, docInfo.Id.ProjectId)
ProjectSystem\VisualStudioWorkspaceImpl.cs (11)
772GetProjectData(info.Id.ProjectId, out _, out var project); 786AddDocumentToFolder(project, info.Id, [AppCodeFolderName], info.Name, documentKind, initialText, info.FilePath); 790AddDocumentToFolder(project, info.Id, folders, info.Name, documentKind, initialText, info.FilePath); 794AddDocumentToProject(project, info.Id, info.Name, documentKind, initialText, info.FilePath); 802undoManager?.Add(new RemoveAdditionalDocumentUndoUnit(this, info.Id)); 806undoManager?.Add(new RemoveAnalyzerConfigDocumentUndoUnit(this, info.Id)); 810undoManager?.Add(new RemoveDocumentUndoUnit(this, info.Id)); 930if (PathUtilities.GetDirectoryName(CurrentSolution.GetProject(documentInfo.Id.ProjectId)?.FilePath) == solutionDirectory) 961documentInfo.Id, 1228GetProjectData(updatedInfo.Id.ProjectId, out var _, out var dteProject); 1294if (document.Id != updatedInfo.Id)
Microsoft.VisualStudio.LanguageServices.LiveShare (1)
Client\RemoteLanguageServiceWorkspace.cs (1)
341return CurrentSolution.GetRequiredDocument(docInfo.Id);