45 references to GetDocument
AnalyzerRunner (3)
CodeRefactoringRunner.cs (1)
116return projectChanges[0].NewProject.GetDocument(document.Id);
DiagnosticAnalyzerRunner.cs (2)
115var document = project.GetDocument(documentId); 192SyntaxTree tree = await project.GetDocument(documentId).GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
496var document = project.GetDocument(documentId);
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
497var document = project.GetDocument(documentId);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Workspaces\WorkspaceTests_EditorFeatures.cs (2)
1059var doc = project.GetDocument(additionalDoc.Id); 1083var doc = project.GetDocument(analyzerConfigDoc.Id);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (3)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (3)
679result.Add(await AnalyzeDocumentAsync(oldProject, newProject.GetDocument(changedDocumentId))); 725result.Add(await AnalyzeDocumentAsync(oldProject, newProject.GetDocument(changedDocumentId))); 746var newDocument = newProject.GetDocument(documentId);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Snippets\AbstractSnippetProviderTests.cs (1)
45document = editorConfigDoc.Project.GetDocument(document.Id)!;
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (1)
392return project.GetDocument(documentId);
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (2)
92var document = project.GetDocument(documentId); 485if (_project.GetDocument(documentId)?.SupportsDiagnostics() == false)
Microsoft.CodeAnalysis.Workspaces (12)
Editing\SymbolEditor.cs (1)
88yield return project.GetDocument(id);
Shared\Extensions\ProjectExtensions.cs (1)
35=> project.GetDocument(documentId) ?? throw new InvalidOperationException(WorkspaceExtensionsResources.The_solution_does_not_contain_the_specified_document);
Workspace\Solution\Project.cs (4)
196public IEnumerable<Document> Documents => DocumentIds.Select(GetDocument)!; 261var document = GetDocument(documentId); 275var document = GetDocument(documentId) ?? GetAdditionalDocument(documentId) ?? GetAnalyzerConfigDocument(documentId); 839return documentId is null ? null : GetDocument(documentId);
Workspace\Solution\Solution.cs (1)
238=> GetProject(documentId?.ProjectId)?.GetDocument(documentId!);
Workspace\Workspace.cs (5)
1702&& projectChanges.GetChangedDocuments().Any(id => projectChanges.NewProject.GetDocument(id)!.HasInfoChanged(projectChanges.OldProject.GetDocument(id)!))) 1899var document = projectChanges.NewProject.GetDocument(documentId)!; 1953var oldDoc = projectChanges.OldProject.GetDocument(documentId)!; 1954var newDoc = projectChanges.NewProject.GetDocument(documentId)!;
Microsoft.CodeAnalysis.Workspaces.UnitTests (9)
FindReferencesTests.cs (3)
178tree = await prj.GetDocument(docId).GetSyntaxTreeAsync(); 217tree = await prj.GetDocument(docId).GetSyntaxTreeAsync(); 281tree = await prj.GetDocument(docId).GetSyntaxTreeAsync();
SolutionTests\SolutionTests.cs (6)
2583Assert.Equal(document, project.GetDocument(did)); 2600Assert.Equal(document2, project2.GetDocument(did2)); 2621var document1 = project.GetDocument(documentInfo1.Id); 2622var document2 = project.GetDocument(documentInfo2.Id); 2647var document1 = project1.GetDocument(documentInfo1.Id); 2648var document2 = project2.GetDocument(documentInfo2.Id);
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
538var document = project.GetDocument(documentId);
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
538var document = project.GetDocument(documentId);
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
538var document = project.GetDocument(documentId);
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
538var document = project.GetDocument(documentId);
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
538var document = project.GetDocument(documentId);
Microsoft.VisualStudio.LanguageServices (2)
Progression\GraphBuilder.cs (2)
98document = project.GetDocument(docIdWithPath); 142var document = project.GetDocument(documentId);
Mvc.Api.Analyzers.Test (2)
AddResponseTypeAttributeCodeFixProviderIntegrationTest.cs (1)
75project.GetDocument(controllerDocument),
ApiActionsDoNotRequireExplicitModelValidationCheckCodeFixProviderTest.cs (1)
40project.GetDocument(controllerDocument),
Roslyn.VisualStudio.Next.UnitTests (1)
Services\SolutionServiceTests.cs (1)
317var document = project.GetDocument(existingDocumentId);