274 references to GetDocument
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
141var document = solution.GetDocument(pair.Key);
IdeBenchmarks (3)
FormatterBenchmarks.cs (2)
47var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id); 60var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
RegexClassifierBenchmarks.cs (1)
73var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
IdeCoreBenchmarks (2)
FormatterBenchmarks.cs (2)
53var document = solution.GetDocument(documentId); 57_document = solution.GetDocument(documentId);
Microsoft.Analyzers.Extra (1)
CallAnalysis\Fixers\LegacyLoggingFixer.cs (1)
323var doc = sol.GetDocument(docId)!;
Microsoft.AspNetCore.Analyzer.Testing (1)
CodeFixRunner.cs (1)
39var updatedDocument = updatedSolution.GetDocument(document.Id);
Microsoft.AspNetCore.App.Analyzers.Test (3)
TestDiagnosticAnalyzer.cs (3)
32var doc = project.Solution.GetDocument(project.Documents.First().Id); 49var doc = project.Solution.GetDocument(project.Documents.First().Id); 71var document = project.Solution.GetDocument(project.Documents.First().Id);
Microsoft.AspNetCore.Components.Analyzers.Tests (1)
Helpers\CodeFixVerifier.Helper.cs (1)
30return solution.GetDocument(document.Id);
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (1)
Helpers\CodeFixVerifier.Helper.cs (1)
30return solution.GetDocument(document.Id);
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (2)
33=> solution.GetDocument(documentId) ?? solution.GetAdditionalDocument(documentId) ?? solution.GetAnalyzerConfigDocument(documentId); 62return solution.GetDocument(documentId) ?? throw CreateDocumentNotFoundException();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (36)
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
919var documentToModify = workspace.CurrentSolution.GetDocument(documentToModifyId);
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (4)
83Assert.Null(newSolution.GetDocument(oldDocumentId)); 197var oldRefText = (await oldSolution.GetDocument(refDocumentId).GetTextAsync()).ToString(); 198var newRefText = (await newSolution.GetDocument(refDocumentId).GetTextAsync()).ToString(); 205var actualRefText = (await newSolution.GetDocument(refDocumentId).GetTextAsync()).ToString();
Completion\CompletionProviders\AbstractCSharpCompletionProviderTests.cs (1)
171var document = workspace.CurrentSolution.GetDocument(documentId);
Completion\CompletionProviders\ObjectInitializerCompletionProviderTests.cs (2)
690var document = workspace.CurrentSolution.GetDocument(hostDocument.Id); 1282var document = workspace.CurrentSolution.GetDocument(hostDocument.Id);
Completion\CompletionProviders\SymbolCompletionProviderTests_NoInteractive.cs (2)
376var document = workspace.CurrentSolution.GetDocument(testDocument.Id); 387var currentDocument = workspace.CurrentSolution.GetDocument(testDocument.Id);
Completion\CompletionServiceTests.cs (1)
138var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
Debugging\ProximityExpressionsGetterTests.cs (1)
76var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
EncapsulateField\EncapsulateFieldTestState.cs (1)
35TargetDocument = Workspace.CurrentSolution.GetDocument(_testDocument.Id);
ExtractMethod\ExtractMethodBase.cs (3)
118var document = workspace.CurrentSolution.GetDocument(testDocument.Id); 167var document = workspace.CurrentSolution.GetDocument(testDocument.Id); 190var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
Formatting\CodeCleanupTests.cs (3)
818var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 835var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 917var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
Formatting\Indentation\SmartIndenterEnterOnTokenTests.cs (2)
1405var document = workspace.CurrentSolution.GetDocument(hostdoc.Id); 1446var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (1)
3412var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
MoveToNamespace\MoveToNamespaceTests.cs (1)
1414var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
Organizing\AbstractOrganizerTests.cs (1)
29var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
Workspaces\WorkspaceTests_EditorFeatures.cs (12)
513var docZ = solutionZ.GetDocument(document1.Id); 573var doc1Z = cs.GetDocument(document1.Id); 644var doc1Z = cs.GetDocument(document1.Id); 649var doc2Z = cs.GetDocument(document2.Id); 666var doc1Z = cs.GetDocument(document1.Id); 671var doc2Z = cs.GetDocument(document2.Id); 729Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 736Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 1430Assert.Equal(originalText, (await eventArgs[0].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1431Assert.Equal(originalText, (await eventArgs[1].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1433Assert.Equal(updatedText, (await eventArgs[0].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1434Assert.Equal(updatedText, (await eventArgs[1].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString());
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (7)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (7)
308var newDocument = newSolution.GetDocument(documentId); 374var result = await AnalyzeDocumentAsync(oldProject, newSolution.GetDocument(documentId)); 436var result = await AnalyzeDocumentAsync(oldProject, newSolution.GetDocument(documentId)); 518var result = await AnalyzeDocumentAsync(oldProject, newSolution.GetDocument(documentId)); 587var result = await AnalyzeDocumentAsync(oldProject, newSolution.GetDocument(documentId)); 626var result = await AnalyzeDocumentAsync(oldProject, newSolution.GetDocument(documentId)); 800var newDocument = newSolution.GetDocument(documentId);
Microsoft.CodeAnalysis.EditorFeatures (11)
CodeActions\CodeActionEditHandlerService.cs (1)
246return oldSolution.GetDocument(changedDocuments[0]);
EditAndContinue\PdbMatchingSourceTextProvider.cs (2)
61var oldDocument = e.OldSolution.GetDocument(e.DocumentId); 68var newDocument = e.NewSolution.GetDocument(e.DocumentId);
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (3)
409var firstDocumentNewText = conflictResolution.NewSolution.GetDocument(firstDocumentReplacements.document.Id).GetTextSynchronously(cancellationToken); 418var documentNewText = conflictResolution.NewSolution.GetDocument(document.Id).GetTextSynchronously(cancellationToken); 448conflictResolution.NewSolution.GetDocument(document.Id),
Navigation\IDocumentNavigationServiceExtensions.cs (1)
78var document = workspace.CurrentSolution.GetDocument(documentId);
Remote\SolutionChecksumUpdater.cs (2)
152var oldDocument = e.OldSolution.GetDocument(e.DocumentId); 153var newDocument = e.NewSolution.GetDocument(e.DocumentId);
RenameTracking\RenameTrackingTaggerProvider.cs (1)
71var document = workspace.CurrentSolution.GetDocument(documentId);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
207var documentWithOriginalName = solutionWithOriginalName.GetDocument(documentId);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (25)
BraceMatching\AbstractBraceMatcherTests.cs (1)
27var document = workspace.CurrentSolution.GetDocument(workspace.Documents.First().Id);
CodeLens\AbstractCodeLensTest.cs (4)
25var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id); 53var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id); 79var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id); 105var document = workspace.CurrentSolution.GetDocument(annotatedDocument.Id);
Completion\AbstractCompletionProviderTests.cs (5)
814var document = solution.GetDocument(documentId); 870var document = solution.GetDocument(documentId); 900var document = solution.GetDocument(currentContextDocumentId); 1049var document = workspace.CurrentSolution.GetDocument(hostDocument.Id); 1094var document = workspace.CurrentSolution.GetDocument(documentId);
Diagnostics\GenerateType\GenerateTypeTestState.cs (1)
50InvocationDocument = Workspace.CurrentSolution.GetDocument(_testDocument.Id);
ExtractInterface\AbstractExtractInterfaceTests.cs (1)
162var updatedDocument = updatedSolution.GetDocument(testState.ExtractFromDocument.Id);
ExtractInterface\ExtractInterfaceTestState.cs (1)
62ExtractFromDocument = Workspace.CurrentSolution.GetDocument(_testDocument.Id);
Formatting\CoreFormatterTestsBase.cs (1)
183var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (2)
38var document = workspace.CurrentSolution.GetDocument(hostDocument.Id); 62var document = workspace.CurrentSolution.GetDocument(hostDocument.Id);
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
50var document = workspace.CurrentSolution.GetDocument(testDocument.Id);
Rename\RenamerTests.cs (4)
73var document = solution.GetDocument(documentId); 89var updatedDocument = solution.GetDocument(documentId); 206var document = solution.GetDocument(documentId); 237var document = solution.GetDocument(documentId);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (3)
350var document = testWorkspace.CurrentSolution.GetDocument(documentId); 353document = testWorkspace.CurrentSolution.GetDocument(documentId); 469var document = testWorkspace.CurrentSolution.GetDocument(documentId);
Workspaces\TestWorkspaceFixture.cs (1)
93return GetWorkspace().CurrentSolution.GetDocument(hostDocument.Id);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (10)
CodeGeneration\CodeGenerationTests.cs (1)
635.GetDocument(documentId)
Diagnostics\SuppressMessageAttributeWorkspaceTests.cs (1)
66var document = workspace.CurrentSolution.GetDocument(documentId);
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
260var document1 = await solution.GetDocument(documentId).GetTextAsync();
RenameTracking\RenameTrackingTestState.cs (1)
170var document = this.Workspace.CurrentSolution.GetDocument(HostDocument.Id);
Structure\BlockStructureServiceTests.cs (1)
116var document = workspace.CurrentSolution.GetDocument(hostDocument.Id);
Structure\StructureTaggerTests.cs (1)
403var document = workspace.CurrentSolution.GetDocument(hostdoc.Id);
TextEditor\OpenDocumentTests.cs (2)
52Assert.Equal(documentIds.Last(), workspace.CurrentSolution.GetDocument(documentIds.First()).GetLinkedDocumentIds().Single()); 53Assert.Equal(documentIds.First(), workspace.CurrentSolution.GetDocument(documentIds.Last()).GetLinkedDocumentIds().Single());
TextEditor\TryGetDocumentTests.cs (2)
26var document = workspace.CurrentSolution.GetDocument(workspace.GetDocumentId(hostDocument)); 54var document = workspace.CurrentSolution.GetDocument(workspace.GetDocumentId(hostDocument));
Microsoft.CodeAnalysis.Features (10)
ChangeSignature\AbstractChangeSignatureService.cs (1)
458var document = solution.GetDocument(documentId);
EditAndContinue\CommittedSolution.cs (2)
153var committedDocument = solution.GetDocument(documentId); 292matchingDocument = _solution.GetDocument(documentId);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.cs (1)
575var document = solution.GetDocument(documentId);
ExtractInterface\AbstractExtractInterfaceService.cs (2)
291var document = formattedSolution.GetDocument(documentId); 334var document = solution.GetDocument(documentId);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
279var newDocument = newSolution.GetDocument(newDocumentId);
NavigateTo\RoslynNavigateToItem.cs (1)
76var document = solution.GetDocument(DocumentId);
Navigation\INavigableItem.cs (1)
85var document = solution.GetDocument(Id);
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (1)
343var document = solution.GetDocument(documentId);
Microsoft.CodeAnalysis.Features.UnitTests (11)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (11)
114Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdA).GetTextSynchronously(default).ChecksumAlgorithm); 115Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdB).GetTextSynchronously(default).ChecksumAlgorithm); 116Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdC).GetTextSynchronously(default).ChecksumAlgorithm); 117Assert.Equal(SourceHashAlgorithm.Sha1, solution.GetDocument(documentIdE).GetTextSynchronously(default).ChecksumAlgorithm); 257var document2 = solution.GetDocument(document1.Id); 320var document2 = solution.GetDocument(documentInfo.Id); 360var document1 = solution.GetDocument(documentInfo.Id); 443var designTimeOnlyDocument2 = solution.GetDocument(designTimeOnlyDocumentId); 589var document2 = solution.GetDocument(document1.Id); 876var document2 = solution.GetDocument(document1.Id); 976var document2 = solution.GetDocument(document1.Id);
Microsoft.CodeAnalysis.LanguageServer (1)
HostWorkspace\LanguageServerWorkspace.cs (1)
103var textDocument = w.CurrentSolution.GetDocument(documentId) ?? w.CurrentSolution.GetAdditionalDocument(documentId);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\CodeActions\CodeActionResolveHelper.cs (1)
154solution.GetDocument).ConfigureAwait(false);
Handler\SemanticTokens\SemanticTokensRefreshQueue.cs (1)
89var oldDocument = e.OldSolution.GetDocument(e.DocumentId);
Microsoft.CodeAnalysis.Remote.ServiceHub (5)
Host\RemoteWorkspace.SolutionCreator.cs (2)
588document = document.Project.Solution.WithDocumentFolders(document.Id, newDocumentInfo.Folders).GetDocument(document.Id)!; 595document = document.Project.Solution.WithDocumentSourceCodeKind(document.Id, newDocumentInfo.SourceCodeKind).GetDocument(document.Id)!;
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (1)
95var document = workspace.CurrentSolution.GetDocument(documentId);
Services\SemanticClassification\RemoteSemanticClassificationService.cs (1)
34var document = solution.GetDocument(documentId) ?? await solution.GetSourceGeneratedDocumentAsync(documentId, cancellationToken).ConfigureAwait(false);
Services\SymbolFinder\RemoteSymbolFinderService.cs (1)
64documentArgs.Select(solution.GetDocument).WhereNotNull().ToImmutableHashSet();
Microsoft.CodeAnalysis.Workspaces (24)
Editing\SymbolEditor.cs (3)
75yield return ChangedSolution.GetDocument(id); 80yield return ChangedSolution.GetDocument(id); 484var doc = ChangedSolution.GetDocument(declGroup.Key);
Remote\RemoteUtilities.cs (3)
34var oldDoc = oldSolution.GetDocument(docId); 35var newDoc = newSolution.GetDocument(docId); 58var oldText = await oldSolution.GetDocument(tuple.documentId).GetValueTextAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (2)
33=> solution.GetDocument(documentId) ?? solution.GetAdditionalDocument(documentId) ?? solution.GetAnalyzerConfigDocument(documentId); 62return solution.GetDocument(documentId) ?? throw CreateDocumentNotFoundException();
Workspace\DocumentTracking\IDocumentTrackingServiceExtensions.cs (2)
20return solution.GetDocument(service.TryGetActiveDocument()); 29.Select(solution.GetDocument)
Workspace\ProjectSystem\ProjectSystemProject.BatchingDocumentCollection.cs (1)
338if (_project._projectSystemProjectFactory.Workspace.CurrentSolution.GetDocument(documentId) != null)
Workspace\Solution\Project.cs (3)
705return this.Solution.AddDocument(id, name, syntaxRoot, folders, filePath, preservationMode: PreservationMode.PreserveIdentity).GetDocument(id)!; 714return this.Solution.AddDocument(id, name, text, folders, filePath).GetDocument(id)!; 723return this.Solution.AddDocument(id, name, text, folders, filePath).GetDocument(id)!;
Workspace\Solution\Solution.cs (1)
333return GetDocument(documentState.Id)!;
Workspace\TextExtensions.cs (2)
77.GetDocument(id); 131return workspace.CurrentSolution.GetDocument(id);
Workspace\Workspace.cs (5)
1070var oldAttributes = oldSolution.GetDocument(documentId)!.State.Attributes; 1108static (solution, docId) => solution.GetDocument(docId), 1159static (solution, docId) => solution.GetDocument(docId), 1286var newDocument = newSolution.GetDocument(updatedDocumentId); 2443if (solution.GetDocument(documentId) == null)
Workspace\Workspace_Editor.cs (2)
368var oldDocument = oldSolution.GetDocument(documentId); 656var document = oldSolution.GetDocument(documentId);
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildWorkspace.cs (2)
387var document = this.CurrentSolution.GetDocument(documentId); 513var document = this.CurrentSolution.GetDocument(documentId);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (4)
VisualStudioMSBuildWorkspaceTests.cs (4)
399var document1 = solution1.GetDocument(document.Id); 412var document2 = solution2.GetDocument(document.Id); 2124var document2 = solution2.GetDocument(document.Id); 2177var document2 = solution2.GetDocument(newDocId);
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (3)
SolutionUtilities.cs (2)
44return newSolution.GetDocument(documentId)!; 72return newSolution.GetDocument(documentId)!;
WorkspaceExtensions.cs (1)
19var newSolution = oldSolution.AddDocument(id, name, initialText, folders).GetDocument(id)!.WithSourceCodeKind(sourceCodeKind).Project.Solution;
Microsoft.CodeAnalysis.Workspaces.UnitTests (66)
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (1)
53AssertEx.EqualOrDiff(expectedMergedText, mergedSolution.GetDocument(documentIds[i]).GetTextAsync().Result.ToString());
SolutionTests\SolutionTests.cs (50)
179Assert.Equal(name, newSolution1.GetDocument(documentId)!.Name); 199Assert.Equal(folders, newSolution1.GetDocument(documentId)!.Folders); 206Assert.Equal([], newSolution3.GetDocument(documentId)!.Folders); 294Assert.Equal(SourceCodeKind.Script, newSolution.GetDocument(documentId)!.SourceCodeKind); 310Assert.True(newSolution1.GetDocument(documentId)!.TryGetSyntaxRoot(out var actualRoot)); 377Assert.True(newSolution1.GetDocument(documentId)!.TryGetText(out var actualText)); 378Assert.True(newSolution1.GetDocument(documentId)!.TryGetTextVersion(out var actualVersion)); 1015Assert.Equal("new text", newSolution1.GetDocument(documentId)!.GetTextSynchronously(CancellationToken.None).ToString()); 2581var document = solution.GetDocument(did); 2584Assert.Equal(document, solution.GetDocument(did)); 2598var document2 = solution.GetDocument(did2); 2601Assert.Equal(document2, solution.GetDocument(did2)); 3142var document = sol.GetDocument(did); 3163var document = solution1.GetDocument(documentId); 3169var newText = solution2.GetDocument(documentId).GetTextAsync().Result.ToString(); 3186var document = sol.GetDocument(did); 3194var doc2 = sol2.GetDocument(did); 3227var document = sol.GetDocument(did); 3270var oldDocument = solution.GetDocument(documentId); 3278var newDocument = solution.GetDocument(documentId); 3314var observedText2 = sol.GetDocument(did).GetTextAsync().Result; 3330var doc = sol.GetDocument(did); 3352var doc = sol.GetDocument(did); 3378var doc = sol.GetDocument(did); 3397var doc = sol.GetDocument(did); 3419var doc = sol.GetDocument(did); 3440var doc = sol.GetDocument(did); 3460var doc = sol.GetDocument(did); 3500var doc = sol.GetDocument(did); 3527var observedText = solution.GetDocument(documentId).GetTextAsync().Result; 3558var observedText = solution.GetDocument(documentId).GetTextAsync().Result; 3590var observedTree = solution.GetDocument(documentId).GetSyntaxRootAsync().Result; 3616var observedTree = solution.GetDocument(documentId).GetSyntaxRootAsync().Result; 3681var doc = sol.GetDocument(did); 3694var doc2 = doc.Project.Solution.WithDocumentSyntaxRoot(doc.Id, newRoot, PreservationMode.PreserveValue).GetDocument(doc.Id); 3775var document = sol.GetDocument(did); 3915var doc = solution.GetDocument(did); 4134var documentToFreezeChanged = solution.GetDocument(documentToFreezeOriginal.Id); 4179var documentToFreezeChanged = solution.GetDocument(documentToFreezeOriginal.Id); 4679var originalSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4690var newSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4723var syntaxTreeAfterAddingEditorConfig = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4734var syntaxTreeAfterRemovingEditorConfig = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4764var syntaxTreeBeforeEditorConfigChange = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4777var syntaxTreeAfterEditorConfigChange = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4842var originalSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 4858var newSyntaxTree = await solution.GetDocument(sourceDocumentId).GetSyntaxTreeAsync(); 5433var doc = solution.GetDocument(docInfo.Id); 5439var newDoc = doc.Project.Solution.WithDocumentSyntaxRoot(doc.Id, newRoot).GetDocument(doc.Id); 5472solution.GetDocument(documentId));
SymbolKeyTests.cs (2)
877document = workspace.CurrentSolution.GetDocument(document.Id); 924document = workspace.CurrentSolution.GetDocument(document.Id);
SyntaxNodeTests.cs (1)
91var doc = sol.GetDocument(did);
WorkspaceTests\AdhocWorkspaceTests.cs (11)
62Assert.Equal(ws.CurrentSolution.GetDocument(info.Id), doc); 226var doc = ws.CurrentSolution.GetDocument(docInfo.Id); 231doc = ws.CurrentSolution.GetDocument(docInfo.Id); 239doc = ws.CurrentSolution.GetDocument(docInfo.Id); 333var doc = ws.CurrentSolution.GetDocument(docInfo.Id); 390var frozen = pws.CurrentSolution.GetDocument(docid1).WithFrozenPartialSemantics(CancellationToken.None); 434var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 467var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 501var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 532var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id); 562var appliedDoc = ws.CurrentSolution.GetDocument(originalDoc.Id);
WorkspaceTests\WorkspaceTests.cs (1)
182return this.CurrentSolution.GetDocument(documentInfo.Id);
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
209projectsToAddUnsafe.Add(solutionEditor.OriginalSolution.GetDocument(documentId).Project);
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (1)
209projectsToAddUnsafe.Add(solutionEditor.OriginalSolution.GetDocument(documentId).Project);
Microsoft.VisualStudio.LanguageServices (21)
CallHierarchy\CallHierarchyDetail.cs (1)
70var document = solution.GetDocument(_documentId);
CallHierarchy\Finders\AbstractCallFinder.cs (1)
134var currentDocument = project.Solution.GetDocument(activeDocument);
CodeLens\CodeLensCallbackListener.cs (1)
218return Task.FromResult(solution.GetDocument(currentContextId));
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
92return solution.GetDocument(currentDocumentId).State.GetTextSynchronously(CancellationToken.None).Lines;
Extensions\VisualStudioWorkspaceImplExtensions.cs (1)
70var document = workspace.CurrentSolution.GetDocument(id);
Implementation\VsRefactorNotifyService.cs (1)
191var document = visualStudioWorkspace.CurrentSolution.GetDocument(documentId);
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (2)
85var oldDocument = e.OldSolution.GetDocument(e.DocumentId); 86var newDocument = e.NewSolution.GetDocument(e.DocumentId);
Preview\TopLevelChange.cs (1)
89var oldLinkedDocument = oldDocument.Project.Solution.GetDocument(linkedDocumentId);
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
336var document = newSolution.GetDocument(documentId) ?? currentSolution.GetDocument(documentId);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
329if (solution.GetDocument(documentId) is { } document)
ProjectSystem\VisualStudioWorkspaceImpl.RemoveDocumentUndoUnit.cs (1)
25=> currentSolution.GetDocument(this.DocumentId);
TaskList\ProjectExternalErrorReporter.cs (1)
318if (workspace.CurrentSolution.GetDocument(documentId) is Document document &&
Utilities\IVsEditorAdaptersFactoryServiceExtensions.cs (1)
30var document = workspace.CurrentSolution.GetDocument(contextDocumentId);
Venus\ContainedDocument.cs (3)
205return hierarchy.TryGetItemId(_workspace.CurrentSolution.GetDocument(document.Id).FilePath); 242var originalDocument = _workspace.CurrentSolution.GetDocument(this.Id); 763var document = _workspace.CurrentSolution.GetDocument(this.Id);
Venus\ContainedLanguage.IVsContainedLanguageCodeSupport.cs (1)
51var targetDocument = thisDocument.Project.Solution.GetDocument(targetDocumentId);
Workspace\GlobalUndoServiceFactory.WorkspaceGlobalUndoTransaction.cs (1)
65var document = solution.GetDocument(id);
Workspace\VisualStudioDocumentNavigationService.cs (1)
192var document = solution.GetDocument(documentId);
Microsoft.VisualStudio.LanguageServices.LiveShare (4)
Client\RemoteLanguageServiceWorkspace.cs (4)
244return CurrentSolution.GetDocument(docId); 282return CurrentSolution.GetDocument(docId); 386var doc = CurrentSolution.GetDocument(documentId); 476var document = CurrentSolution.GetDocument(documentId);
Microsoft.VisualStudio.LanguageServices.UnitTests (10)
CodeModel\AbstractEventCollectorTests.vb (2)
108Dim codeDocument = workspace.CurrentSolution.GetDocument(workspace.Documents(0).Id) 111Dim changeDocument = workspace.CurrentSolution.GetDocument(workspace.Documents(1).Id)
CodeModel\CSharp\FileCodeModelTests.vb (1)
1022Dim changeDocument = changedWorkspace.CurrentSolution.GetDocument(changedWorkspace.Documents(0).Id)
ExtractInterface\ExtractInterfaceViewModelTests.vb (1)
293Dim workspaceDoc = workspace.CurrentSolution.GetDocument(doc.Id)
Preview\PreviewChangesTests.vb (1)
238Dim finalAddedDocText = finalSolution.GetDocument(addedDocumentId1).GetTextAsync().Result.ToString()
Progression\ProgressionTestState.vb (2)
37Dim document = Workspace.CurrentSolution.GetDocument(hostDocument.Id) 79Dim document = Workspace.CurrentSolution.GetDocument(hostDocument.Id)
Venus\DocumentService_IntegrationTests.vb (1)
201Dim currentDocument = workspace.CurrentSolution.GetDocument(document.Id)
VsNavInfo\VsNavInfoTests.vb (2)
829Dim document = workspace.CurrentSolution.GetDocument(hostDocument.Id) 867Dim document = workspace.CurrentSolution.GetDocument(hostDocument.Id)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
Venus\ContainedLanguageStaticEventBinding.vb (2)
75targetDocument = visualStudioWorkspace.CurrentSolution.GetDocument(targetDocument.Id) 103targetDocument = visualStudioWorkspace.CurrentSolution.GetDocument(targetDocument.Id)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\XamlProjectService.cs (1)
201var document = _workspace.CurrentSolution.GetDocument(documentId);
Roslyn.VisualStudio.Next.UnitTests (2)
Services\ServiceHubServicesTests.cs (2)
1602Assert.Equal(documentStateShouldSame, object.ReferenceEquals(solution1.GetDocument(currentDocumentId).State, solution2.GetDocument(currentDocumentId).State));