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