92 references to DocumentIds
AnalyzerRunner (3)
DiagnosticAnalyzerRunner.cs (2)
113
foreach (var documentId in project.
DocumentIds
)
154
Console.WriteLine($"{project.Name} ({project.
DocumentIds
.Count} documents): {averageEditsInProject:0.00} edits per second");
Program.cs (1)
179
Console.WriteLine("Number of documents:\t\t" + projects.Sum(x => x.
DocumentIds
.Count));
IdeCoreBenchmarks (2)
ProjectOperationBenchmarks.cs (2)
84
foreach (var _ in Project.
DocumentIds
)
108
var documentId = Project.
DocumentIds
.FirstOrDefault();
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
494
foreach (var documentId in project.
DocumentIds
)
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
495
foreach (var documentId in project.
DocumentIds
)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
DocumentTracking\FirstDocumentIsActiveAndVisibleDocumentTrackingService.cs (1)
26
=> _workspace.CurrentSolution.Projects.First().
DocumentIds
.First();
NavigateTo\AbstractNavigateToTests.cs (1)
247
=> ImmutableArray.Create(_workspace.CurrentSolution.Projects.First().
DocumentIds
.First());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (3)
Preview\PreviewWorkspaceTests.cs (3)
77
Assert.Equal(1, previewWorkspace.CurrentSolution.Projects.First().
DocumentIds
.Count);
86
.RemoveDocument(previewWorkspace.CurrentSolution.Projects.First().
DocumentIds
[0]).Solution;
90
Assert.Equal(0, previewWorkspace.CurrentSolution.Projects.First().
DocumentIds
.Count);
Microsoft.CodeAnalysis.Features (7)
DesignerAttribute\DesignerAttributeDiscoveryService.cs (1)
237
foreach (var documentId in project.
DocumentIds
)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (4)
373
foreach (var documentId in project.
DocumentIds
)
624
count += project.
DocumentIds
.Count;
650
foreach (var documentId in project.
DocumentIds
)
668
foreach (var documentId in project.
DocumentIds
)
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
435
foreach (var documentId in project.
DocumentIds
)
SemanticSearch\SemanticSearchUtilities.cs (1)
76
=> GetQueryProject(solution).
DocumentIds
[0];
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
137
: (from project in solution.Projects from documentId in project.
DocumentIds
select documentId).ToImmutableArray();
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.InProcOrRemoteHostAnalyzerRunner.cs (1)
175
var count = documentAnalysisScope != null ? 1 : project.
DocumentIds
.Count + 1;
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_GetDiagnostics.cs (1)
73
=> ProduceProjectDiagnosticsAsync(solution.Projects, static project => project.
DocumentIds
, includeProjectNonLocalResult: true, cancellationToken);
Handler\Diagnostics\DiagnosticSources\AbstractWorkspaceDocumentDiagnosticSource.cs (1)
80
static (project, _) => [.. project.
DocumentIds
.Concat(project.AdditionalDocumentIds)],
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (1)
397
unitCount += _project.
DocumentIds
.Count;
Microsoft.CodeAnalysis.Workspaces (17)
CodeActions\CodeAction_Cleanup.cs (1)
67
.Concat(solutionChanges.GetAddedProjects().SelectMany(p => p.
DocumentIds
))
CodeFixesAndRefactorings\FixAllLogger.cs (2)
83
m[DocumentCount] = fixAllState.Project.
DocumentIds
.Count;
87
m[DocumentCount] = fixAllState.Solution.Projects.Sum(p => p.
DocumentIds
.Count);
Editing\SymbolEditor.cs (1)
86
foreach (var id in project.
DocumentIds
)
FindSymbols\FindLiterals\FindLiteralsSearchEngine.cs (1)
87
var count = _solution.Projects.SelectMany(p => p.
DocumentIds
).Count();
Workspace\Solution\Project.cs (1)
196
public IEnumerable<Document> Documents =>
DocumentIds
.Select(GetDocument)!;
Workspace\Solution\ProjectChanges.cs (10)
97
/// Get <see cref="DocumentId"/>s of added documents in the order they appear in <see cref="Project.
DocumentIds
"/> of the <see cref="NewProject"/>.
103
/// Get <see cref="DocumentId"/>s of added dditional documents in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="NewProject"/>.
109
/// Get <see cref="DocumentId"/>s of added analyzer config documents in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="NewProject"/>.
116
/// in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="NewProject"/>.
122
/// Get changed documents in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="NewProject"/>.
134
/// in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="NewProject"/>.
141
/// in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="NewProject"/>.
147
/// Get <see cref="DocumentId"/>s of removed documents in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="OldProject"/>.
153
/// Get <see cref="DocumentId"/>s of removed additional documents in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="OldProject"/>.
159
/// Get <see cref="DocumentId"/>s of removed analyzer config documents in the order they appear in <see cref="Project.
DocumentIds
"/> of <see cref="OldProject"/>.
Workspace\Workspace.cs (1)
307
addedDocumentIds.AddRange(addedProject.
DocumentIds
);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (3)
VisualStudioMSBuildWorkspaceTests.cs (3)
3009
Assert.Empty(proj.
DocumentIds
);
3026
Assert.Equal(2, proj.
DocumentIds
.Count);
3044
Assert.Equal(2, project.
DocumentIds
.Count);
Microsoft.CodeAnalysis.Workspaces.UnitTests (32)
SolutionTests\ProjectSemanticVersionTests.cs (1)
34
await AssertSemanticVersionChangedAsync(project, project.RemoveDocument(project.
DocumentIds
.Single()));
SolutionTests\SolutionTests.cs (30)
175
var documentId = solution.Projects.Single().
DocumentIds
.Single();
195
var documentId = solution.Projects.Single().
DocumentIds
.Single();
226
var documentId = solution.Projects.Single().
DocumentIds
.Single();
253
var documentId = solution.Projects.Single().
DocumentIds
.Single();
272
var documentId = solution.Projects.Single().
DocumentIds
.Single();
291
var documentId = solution.Projects.Single().
DocumentIds
.Single();
302
var documentId = solution.Projects.Single().
DocumentIds
.Single();
348
var documentId = solution.Projects.Single().
DocumentIds
.Single();
373
var documentId = solution.Projects.Single().
DocumentIds
.Single();
397
var documentId = solution.Projects.Single().
DocumentIds
.Single();
431
var documentId1 = solution.Projects.First().
DocumentIds
.Single();
432
var documentId2 = solution.Projects.Last().
DocumentIds
.Single();
519
var documentId1 = solution.Projects.First().
DocumentIds
.Single();
520
var documentId2 = solution.Projects.Last().
DocumentIds
.Single();
598
var documentId1 = solution.Projects.First().
DocumentIds
.Single();
599
var documentId2 = solution.Projects.Last().
DocumentIds
.Single();
684
var documentId1 = solution.Projects.First().
DocumentIds
.Single();
685
var documentId2 = solution.Projects.Last().
DocumentIds
.Single();
761
var documentId1 = solution.Projects.First().
DocumentIds
.Single();
762
var documentId2 = solution.Projects.Last().
DocumentIds
.Single();
849
var documentId1 = solution.Projects.First().
DocumentIds
.Single();
850
var documentId2 = solution.Projects.Last().
DocumentIds
.Single();
1011
var documentId = solution.Projects.Single().
DocumentIds
.Single();
4288
var forkedProject = originalProject.RemoveDocument(originalProject.
DocumentIds
.Single())
4312
var forkedProject = originalProject.RemoveDocument(originalProject.
DocumentIds
.Single())
4567
ImmutableArray<DocumentId> GetDocumentIds() => [.. solution.GetProject(pid).
DocumentIds
];
5462
var documentId = solution.Projects.Single().
DocumentIds
.Single();
5551
var regularDocumentId = solution.Projects.Single().
DocumentIds
.Single();
5807
var documentId1 = project1.
DocumentIds
.Single();
5817
var documentId2 = project2.
DocumentIds
.Single();
SolutionTests\SolutionWithSourceGeneratorTests.cs (1)
259
var documentId = project.
DocumentIds
.Single();
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
536
foreach (var documentId in project.
DocumentIds
)
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
536
foreach (var documentId in project.
DocumentIds
)
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
536
foreach (var documentId in project.
DocumentIds
)
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
536
foreach (var documentId in project.
DocumentIds
)
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
536
foreach (var documentId in project.
DocumentIds
)
Microsoft.VisualStudio.LanguageServices (4)
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
201
progressTracker.AddItems(projects.Sum(static p => p.
DocumentIds
.Count));
Implementation\HierarchyItemToProjectIdMap.cs (1)
82
if (!candidateProject.
DocumentIds
.Any(id => ContainedDocument.TryGetContainedDocument(id) != null))
Library\ObjectBrowser\Extensions.cs (1)
107
foreach (var documentId in project.
DocumentIds
)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveDocumentUndoUnit.cs (1)
22
=> fromProject.
DocumentIds
;
Mvc.Api.Analyzers.Test (2)
AddResponseTypeAttributeCodeFixProviderIntegrationTest.cs (1)
65
var controllerDocument = project.
DocumentIds
[0];
ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest.cs (1)
32
var controllerDocument = project.
DocumentIds
[0];
Roslyn.VisualStudio.Next.UnitTests (5)
Services\ServiceHubServicesTests.cs (4)
1486
var documentIds = project.
DocumentIds
;
1594
SetEqual(solution1.GetProject(currentProjectId).
DocumentIds
, solution2.GetProject(currentProjectId).
DocumentIds
);
1596
var documentIdsInProject = solution1.GetProject(currentProjectId).
DocumentIds
;
Services\SolutionServiceTests.cs (1)
313
var existingDocumentId = project.
DocumentIds
.First();