436 references to GetTextAsync
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
20return new ValueTask<SourceText>(document.GetTextAsync(cancellationToken));
IdeCoreBenchmarks (1)
ClassificationBenchmarks.cs (1)
97var text = document.GetTextAsync().Result.ToString();
Microsoft.Analyzers.Extra.Tests (7)
Resources\RoslynTestUtils.cs (7)
379var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 387var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 394var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 470var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 478var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 485var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 506var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Analyzers.Local.Tests (7)
Resources\RoslynTestUtils.cs (7)
380var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 388var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 395var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 471var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 479var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 486var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 507var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.AspNetCore.Analyzer.Testing (1)
CodeFixRunner.cs (1)
40var sourceText = await updatedDocument.GetTextAsync();
Microsoft.AspNetCore.App.Analyzers.Test (1)
TestDiagnosticAnalyzer.cs (1)
50var originalText = await doc.GetTextAsync().ConfigureAwait(false);
Microsoft.CodeAnalysis.Analyzers (4)
MetaAnalyzers\Fixers\AnalyzerReleaseTrackingFix.cs (1)
256var unshippedText = await unshippedDataDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.cs (1)
175var text = await fixInfo.AdditionalDocumentToFix.GetTextAsync(cancellationToken).ConfigureAwait(false);
MetaAnalyzers\Fixers\DefineDiagnosticDescriptorArgumentsCorrectlyFix.CustomFixAllProvider.cs (1)
131var text = await additionalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
20return new ValueTask<SourceText>(document.GetTextAsync(cancellationToken));
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
20return new ValueTask<SourceText>(document.GetTextAsync(cancellationToken));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
20return new ValueTask<SourceText>(document.GetTextAsync(cancellationToken));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (3)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
55var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (2)
56var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 148var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (4)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (2)
222var newText = await formattedDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 263var newText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
InlineRename\CSharpEditorInlineRenameService.cs (2)
71var documentText = await renameDefinition.Document.GetTextAsync(cancellationToken).ConfigureAwait(false); 86var documentText = await renameLocation.Document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (44)
ChangeSignature\RemoveParametersTests.cs (4)
262Assert.Contains("void Ext(this C5 c, string s)", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 266Assert.Contains(@"c.Ext(""two"");", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 349Assert.Contains("void Ext(this C5 c, string s, int newIntegerParameter)", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString()); 353Assert.Contains(@"c.Ext(""two"", 123);", (await updatedDocument.GetTextAsync(CancellationToken.None)).ToString());
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
865var formattedText = await formattedDocument.GetTextAsync().ConfigureAwait(false);
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (4)
188var actualText = (await modifiedOriginalDocument.GetTextAsync()).ToString(); 196var oldRefText = (await oldSolution.GetDocument(refDocumentId).GetTextAsync()).ToString(); 197var newRefText = (await newSolution.GetDocument(refDocumentId).GetTextAsync()).ToString(); 204var actualRefText = (await newSolution.GetDocument(refDocumentId).GetTextAsync()).ToString();
Completion\CompletionProviders\OverrideCompletionProviderTests.cs (1)
3537var text = await document.GetTextAsync();
Completion\CompletionServiceTests.cs (1)
139var text = await document.GetTextAsync();
DecompiledSource\DecompiledSourceFormattingTests.cs (1)
245var test = await formatted.GetTextAsync();
Diagnostics\DiagnosticAnalyzerDriver\DiagnosticAnalyzerDriverTests.cs (6)
67await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length)); 95await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); 131return await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, document, new TextSpan(0, document.GetTextAsync().Result.Length)); 177await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, sourceDocument, new TextSpan(0, sourceDocument.GetTextAsync().Result.Length)); 207var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(workspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length)); 263var diagnostics = await DiagnosticProviderTestUtilities.GetAllDiagnosticsAsync(ideEngineWorkspace, ideEngineDocument, new TextSpan(0, ideEngineDocument.GetTextAsync().Result.Length));
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (3)
67var sourcetext = await analyzerConfigDocument.GetTextAsync(default); 76var sourcetext = await analyzerConfigDocument.GetTextAsync(default); 349var text = await editorconfig.GetTextAsync();
ExtractInterface\ExtractInterfaceTests.cs (5)
401var interfaceCode = (await interfaceDocument.GetTextAsync()).ToString(); 441var interfaceCode = (await interfaceDocument.GetTextAsync()).ToString(); 482var interfaceCode = (await interfaceDocument.GetTextAsync()).ToString(); 744var interfaceCode = (await interfaceDocument.GetTextAsync()).ToString(); 909var interfaceCode = (await interfaceDocument.GetTextAsync()).ToString();
Formatting\CodeCleanupTests.cs (2)
844var actual = await newDoc.GetTextAsync(); 952var actual = await newDoc.GetTextAsync();
Formatting\CodeCleanupTests.TestFixers.cs (2)
112solution = solution.WithDocumentText(document.Id, await document.GetTextAsync()); 168solution = solution.WithDocumentText(document.Id, await document.GetTextAsync());
Formatting\RazorLineFormattingOptionsTests.cs (1)
74var formattedText = await formattedDocument.GetTextAsync();
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
168var actual = await document.GetTextAsync();
Workspaces\WorkspaceTests_EditorFeatures.cs (12)
517var docZText = await docZ.GetTextAsync(); 581var hasX = (await doc1Z.GetTextAsync()).ToString().Contains("X"); 656var hasX = (await doc1Z.GetTextAsync()).ToString().Contains("X"); 678var hasX = (await doc1Z.GetTextAsync()).ToString().Contains("X"); 740Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 747Assert.Equal(startText, (await workspace.CurrentSolution.GetDocument(document.Id).GetTextAsync()).ToString()); 1077Assert.Equal("some text", (await additionalDocument.GetTextAsync()).ToString()); 1101Assert.Equal("root = true", (await analyzerConfigDocument.GetTextAsync()).ToString()); 1444Assert.Equal(originalText, (await eventArgs[0].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1445Assert.Equal(originalText, (await eventArgs[1].OldSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1447Assert.Equal(updatedText, (await eventArgs[0].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString()); 1448Assert.Equal(updatedText, (await eventArgs[1].NewSolution.GetDocument(originalDocumentId).GetTextAsync().ConfigureAwait(false)).ToString());
Microsoft.CodeAnalysis.CSharp.Features (3)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForArrayCodeFixProvider.cs (1)
55var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForFluentCodeFixProvider.cs (2)
56var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 148var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
EditAndContinue\CSharpEditAndContinueAnalyzerTests.cs (2)
296var oldText = await oldDocument.GetTextAsync(); 301var newText = await newDocument.GetTextAsync();
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (4)
CodeGeneration\AddAttributesTests.cs (1)
61var actualText = (await formatted.GetTextAsync()).ToString();
CodeGeneration\AddImportsTests.cs (3)
96var actualText = (await formatted.GetTextAsync()).ToString(); 105var actualText = (await formatted.GetTextAsync()).ToString(); 893var actualText = (await formatted.GetTextAsync()).ToString();
Microsoft.CodeAnalysis.EditorFeatures (4)
GoOrFind\AbstractGoOrFindNavigationService.cs (1)
282var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameSession.cs (2)
877: (documentId, newDocument.Name, newRoot: null, await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false))); 883result.Add((documentId, newDocument.Name, newRoot: null, await newDocument.GetTextAsync(cancellationToken).ConfigureAwait(false)));
Navigation\IDocumentNavigationServiceExtensions.cs (1)
85var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (15)
BraceHighlighting\MultiCharacterBraceHighlightingTests.cs (1)
34var text = (await document.GetTextAsync(cancellationToken)).ToString();
BracePairs\AbstractBracePairsTests.cs (1)
33var text = await document.GetTextAsync();
Completion\AbstractCompletionProviderTests.cs (3)
178var code = (await document.GetTextAsync()).ToString(); 647var text = await document.GetTextAsync(); 740var text = await document.GetTextAsync();
ExtractInterface\AbstractExtractInterfaceTests.cs (3)
133var updatedCode = (await updatedOriginalDocument.GetTextAsync()).ToString(); 140var interfaceCode = (await interfaceDocument.GetTextAsync()).ToString(); 160var updatedCode = (await updatedDocument.GetTextAsync()).ToString();
Formatting\AbstractNewDocumentFormattingServiceTests.cs (1)
40var actual = await formattedDocument.GetTextAsync();
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
34var text = await document.GetTextAsync();
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
33var text = await document.GetTextAsync();
Rename\RenamerTests.cs (1)
101AssertEx.EqualOrDiff(endDocument.Text, (await updatedDocument.GetTextAsync()).ToString());
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
356var code = (await document.GetTextAsync()).ToString(); 473var code = (await document.GetTextAsync()).ToString();
TaskList\AbstractTaskListTests.cs (1)
45var sourceText = await document.GetTextAsync();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (18)
CodeFixes\CodeFixServiceTests.cs (2)
917var text = await document.GetTextAsync(ct).ConfigureAwait(false); 1140var text = await sourceDocument.GetTextAsync();
CodeRefactorings\CodeRefactoringServiceTest.cs (1)
304var text = await document.GetTextAsync(ct).ConfigureAwait(false);
Diagnostics\DiagnosticAnalyzerServiceTests.cs (3)
405var text = await additionalDoc.GetTextAsync(); 567var text = await document.GetTextAsync(); 601text = await document.GetTextAsync();
Diagnostics\DiagnosticDataTests.cs (1)
137var text = await document.GetTextAsync();
EditAndContinue\EditAndContinueLanguageServiceTests.cs (2)
382_ = await document1.GetTextAsync(CancellationToken.None); 404var text = await document.GetTextAsync();
LinkedFiles\LinkedFileDiffMergingEditorTests.cs (6)
78var text = await workspace.CurrentSolution.GetRequiredDocument(documentId).GetTextAsync(); 81var linkedText = await workspace.CurrentSolution.GetRequiredDocument(linkedDocumentId).GetTextAsync(); 91Assert.Equal(s_expectedCode, (await workspace.CurrentSolution.GetRequiredDocument(documentId).GetTextAsync()).ToString()); 92Assert.Equal(s_expectedCode, (await workspace.CurrentSolution.GetRequiredDocument(linkedDocumentId).GetTextAsync()).ToString()); 104var sourceText = await linkedDocument.GetTextAsync(); 108.WithDocumentText(document.Id, (await document.GetTextAsync()).Replace(textString.IndexOf("public"), "public".Length, "internal"))
MetadataAsSource\AbstractMetadataAsSourceTests.cs (1)
74var text = await document.GetTextAsync();
Preview\PreviewWorkspaceTests.cs (1)
82Assert.Equal(previewWorkspace.CurrentSolution.Projects.First().Documents.First().GetTextAsync().Result.ToString(), text);
TextEditor\TryGetDocumentTests.cs (1)
40var newSourceText = newDocument.GetTextAsync().Result;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (7)
Diagnostics\AbstractCrossLanguageUserDiagnosticTest.vb (1)
116Dim actual = (Await updatedDocument.GetTextAsync()).ToString().Trim()
Diagnostics\AdditionalFileDiagnosticsTests.vb (1)
56Dim actual = updatedDocument.GetTextAsync().Result.ToString().Trim()
InlineHints\AbstractInlineHintsTests.vb (2)
67Dim value = Await document.GetTextAsync().ConfigureAwait(False) 69Dim expectedText = Await expectedDocument.GetTextAsync().ConfigureAwait(False)
IntelliSense\CSharpCompletionCommandHandlerTests_DefaultsSource.vb (1)
671Dim text = Await document.GetTextAsync(cancellationToken).ConfigureAwait(False)
Simplification\AbstractSimplificationTests.vb (1)
127Dim actualText = (Await simplifiedDocument.GetTextAsync()).ToString()
Simplification\ParameterSimplificationTests.vb (1)
31Assert.Equal(expected, (Await simplifiedDocument.GetTextAsync()).ToString())
Microsoft.CodeAnalysis.Features (4)
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
712var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Copilot\ICopilotChangeAnalysisService.cs (1)
93var oldText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Navigation\IDefinitionLocationService.cs (1)
61var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
SemanticSearch\SemanticSearchWorkspace.cs (1)
43var newText = await queryDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
Snippets\AbstractSnippetProviderTests.cs (1)
72var documentSourceText = await document.GetTextAsync();
Microsoft.CodeAnalysis.Features.UnitTests (5)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (5)
1546var text = await document.GetTextAsync(); 4066var text = await debuggingSession.LastCommittedSolution.GetRequiredProject(document1.Project.Id).GetRequiredDocument(document1.Id).GetTextAsync(); 4597var sourceTextV1 = await document1.GetTextAsync(CancellationToken.None); 4722var text1 = await doc1.GetTextAsync(); 4723var text2 = await doc2.GetTextAsync();
Microsoft.CodeAnalysis.LanguageServer (2)
LanguageServer\Handler\CopilotCompletion\CopilotCompletionResolveContextHandler.cs (1)
37var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Testing\TestDiscoverer.cs (1)
81var text = await document.GetTextAsync(cancellationToken);
Microsoft.CodeAnalysis.LanguageServer.Protocol (10)
ExternalAccess\Razor\SimplifyMethodHandler.cs (1)
54var originalSourceText = await originalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Completion\CompletionResultFactory.cs (3)
536var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 662var sourceText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 687var documentText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\MapCode\MapCodeHandler.cs (2)
109var oldText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 121var focusText = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\RelatedDocuments\RelatedDocumentsHandler.cs (1)
65var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\Rename\PrepareRenameHandler.cs (1)
40var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\SemanticTokens\SemanticTokensHelpers.cs (1)
35var text = await contextDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
Handler\SourceGenerators\SourceGeneratedDocumentCache.cs (1)
43: await unfrozenDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (77)
CodeActions\RunCodeActionsTests.cs (1)
50var textForB = await documentForB.GetTextAsync();
Completion\CompletionFeaturesTests.cs (2)
609var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false); 910var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
224var sourceText = await document.GetTextAsync();
Diagnostics\PullDiagnosticTests.cs (8)
316var text = await document.GetTextAsync(); 336var text = await document.GetTextAsync(); 700var workspaceText = await document.GetTextAsync(CancellationToken.None); 1577var text = await document.GetTextAsync(); 1674var csproj2DocumentText = await csproj2Document.GetTextAsync(); 1762var csproj3DocumentText = await csproj3Document.GetTextAsync().ConfigureAwait(false); 1832var csproj2DocumentText = await csproj2Document.GetTextAsync(); 2266var text = await testLspServer.GetCurrentSolution().GetDocument(documentId)!.GetTextAsync(CancellationToken.None);
InlayHint\AbstractInlayHintTests.cs (1)
27var text = await document.GetTextAsync(CancellationToken.None);
InlayHint\CSharpInlayHintTests.cs (1)
114var sourceText = await document.GetTextAsync();
MapCode\MapCodeTests.cs (2)
37var text = await document.GetTextAsync(cancellationToken); 122var documentText = await document.GetTextAsync();
Miscellaneous\LspMiscellaneousFilesWorkspaceTests.cs (2)
64var miscWorkspaceText = await GetMiscellaneousDocument(testLspServer)!.GetTextAsync(CancellationToken.None); 82miscWorkspaceText = await GetMiscellaneousDocument(testLspServer)!.GetTextAsync(CancellationToken.None);
OnAutoInsert\OnAutoInsertTests.cs (2)
361var documentText = await document.GetTextAsync(); 375var documentText = await (await testLspServer.GetDocumentAsync(locationTyped.DocumentUri)).GetTextAsync();
SemanticTokens\AbstractSemanticTokensTests.cs (1)
78var text = await document.GetTextAsync().ConfigureAwait(false);
SemanticTokens\SemanticTokensRangeTests.cs (1)
490var text = await document.GetTextAsync();
SpellCheck\SpellCheckTests.cs (17)
64var sourceText = await document.GetTextAsync(); 95var sourceText = await document.GetTextAsync(); 130var sourceText = await document.GetTextAsync(); 165var sourceText = await document.GetTextAsync(); 200var sourceText = await document.GetTextAsync(); 223sourceText = await document.GetTextAsync(); 248var sourceText = await document.GetTextAsync(); 262sourceText = await document.GetTextAsync(); 288var sourceText = await document.GetTextAsync(); 314var sourceText = await document.GetTextAsync(); 344var sourceText = await document.GetTextAsync(); 421var sourceText = await document.GetTextAsync(); 461var sourceText = await document.GetTextAsync(); 499var sourceText = await document.GetTextAsync(); 515sourceText = await document.GetTextAsync(); 555var sourceText = await document.GetTextAsync(); 661var sourceText = await document.GetTextAsync();
UriTests.cs (8)
151var fileTextResult = await fileDocument.GetTextAsync(); 158var gitText = await gitDocument.GetTextAsync(); 189var originalText = await lspDocument.GetTextAsync(CancellationToken.None); 204var encodedText = await encodedDocument.GetTextAsync(CancellationToken.None); 237var originalText = await lspDocument.GetTextAsync(CancellationToken.None); 250var lowerCaseText = await lowerCaseDocument.GetTextAsync(CancellationToken.None); 283var originalText = await lspDocument.GetTextAsync(CancellationToken.None); 352Assert.Equal("hello", (await document!.GetTextAsync()).ToString());
Workspaces\LspWorkspaceManagerTests.cs (30)
37Assert.Equal("LSP text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 43Assert.Equal("More textLSP text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 94Assert.Equal($"Some more text{markupOne}", (await firstDocumentWithChange.GetTextAsync(CancellationToken.None)).ToString()); 124Assert.Equal("LSP text", (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 129Assert.Equal("Two is now three!", (await secondDocument.GetTextAsync()).ToString()); 162Assert.Equal(markup, (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 195Assert.Equal("LSP text", (await openedDocument.GetTextAsync(CancellationToken.None)).ToString()); 255Assert.Equal("LSP text", (await miscDocument.GetTextAsync(CancellationToken.None)).ToString()); 261var miscText = await miscDocument.GetTextAsync(CancellationToken.None); 273var documentText = await document.GetTextAsync(CancellationToken.None); 399var changedFirstDocumentText = await changedFirstDocument.GetTextAsync(CancellationToken.None); 400var firstDocumentText = await firstDocument.GetTextAsync(CancellationToken.None); 495Assert.Equal("Server one text", (await documentServerTwo.GetTextAsync(CancellationToken.None)).ToString()); 499Assert.Equal("Original text", (await documentServerTwo.GetTextAsync(CancellationToken.None)).ToString()); 531Assert.Equal("Text", (await lspDocument.GetTextAsync(CancellationToken.None)).ToString()); 556Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 566(await document1.GetTextAsync(CancellationToken.None)).ToString(), 567(await testLspServer.TestWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetTextAsync()).ToString()); 575Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 579(await document1.GetTextAsync(CancellationToken.None)).ToString(), 580(await testLspServer.TestWorkspace.CurrentSolution.Projects.Single().Documents.Single().GetTextAsync()).ToString()); 593Assert.Equal("Text", (await document1.GetTextAsync(CancellationToken.None)).ToString()); 614Assert.Equal("Text", (await document.GetTextAsync(CancellationToken.None)).ToString()); 622Assert.Equal("New Disk Contents", (await document.GetTextAsync()).ToString()); 628Assert.Equal("Text", (await document.GetTextAsync(CancellationToken.None)).ToString()); 631Assert.Equal("Text", (await document.GetTextAsync()).ToString()); 653var originalSourceText = await originalDocument.GetTextAsync(CancellationToken.None); 664var newSourceText = await newDocument.GetTextAsync(CancellationToken.None); 751Assert.Equal(generatorText, (await sourceGeneratedDocument.GetTextAsync(CancellationToken.None)).ToString()); 762Assert.Equal(openText, (await lspDocument.GetTextAsync(CancellationToken.None)).ToString());
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
20return new ValueTask<SourceText>(document.GetTextAsync(cancellationToken));
Microsoft.CodeAnalysis.PublicApiAnalyzers.CodeFixes (6)
AnnotatePublicApiFix.cs (2)
73SourceText sourceText = await publicSurfaceAreaDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 181var text = await doc.GetTextAsync(cancellationToken).ConfigureAwait(false);
DeclarePublicApiFix.cs (2)
106var sourceText = await surfaceAreaDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 251await publicSurfaceAreaAdditionalDocument.GetTextAsync(cancellationToken).ConfigureAwait(false) :
NullableEnablePublicApiFix.cs (2)
58SourceText sourceText = await surfaceAreaDocument.GetTextAsync(cancellationToken).ConfigureAwait(false); 103var shippedSourceText = await shippedDocument.GetTextAsync(cancellationToken).ConfigureAwait(false);
Microsoft.CodeAnalysis.TestAnalyzerReference (1)
NonSourceFileRefactoring.cs (1)
27var text = await document.GetTextAsync(ct).ConfigureAwait(false);
Microsoft.CodeAnalysis.VisualBasic.Features.UnitTests (1)
EditAndContinue\VisualBasicEditAndContinueAnalyzerTests.vb (1)
471Dim newText = Await newDocument.GetTextAsync()
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (10)
CaseCorrection\VisualBasicCaseCorrectionTestBase.vb (1)
20Dim actual = Await newNode.GetTextAsync()
CodeGeneration\AddImportsTests.vb (2)
101Dim actualText = (Await formatted.GetTextAsync()).ToString() 108Dim actualText = (Await formatted.GetTextAsync()).ToString()
Formatting\FormattingTests.vb (4)
3021AssertResult(inputOutput, Await document.GetTextAsync(), result) 3023Dim document2 = document.WithText((Await document.GetTextAsync()).WithChanges(result)) 3028AssertResult(inputOutput, Await document2.GetTextAsync(), result2) 4210Dim actual = (Await document.GetTextAsync()).ToString()
Formatting\VisualBasicFormattingTestBase.vb (3)
67AssertResult(expected, Await document.GetTextAsync(), changes) 70AssertResult(expected, Await document.GetTextAsync(), changes) 76AssertResult(expected, Await document.GetTextAsync(), changes)
Microsoft.CodeAnalysis.Workspaces (3)
CodeFixesAndRefactorings\DocumentBasedFixAllProviderHelpers.cs (1)
54.SelectAsArrayAsync(async documentId => (documentId, await cleanedSolution.GetRequiredDocument(documentId).GetTextAsync(cancellationToken).ConfigureAwait(false)))
Workspace\Solution\Document.cs (2)
504text = useAsync ? await this.GetTextAsync(cancellationToken).ConfigureAwait(false) : this.GetTextSynchronously(cancellationToken); 505oldText = useAsync ? await oldDocument.GetTextAsync(cancellationToken).ConfigureAwait(false) : oldDocument.GetTextSynchronously(cancellationToken);
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (25)
VisualStudioMSBuildWorkspaceTests.cs (25)
966var getTextTask = doc.GetTextAsync(); 998var text = await doc.GetTextAsync(); 2008var text2 = await document2.GetTextAsync(); 2040var originalText = await document.GetTextAsync(); 2051var text2 = await document2.GetTextAsync(); 2059var text = await document.GetTextAsync(); 2074var originalText = await document.GetTextAsync(); 2087var text = await document.GetTextAsync(); 2101var text = await document.GetTextAsync(); 2110var text2 = await document2.GetTextAsync(); 2128var text = await document.GetTextAsync(); 2137var text2 = await document2.GetTextAsync(); 2163var text2 = await document2.GetTextAsync(); 2224var text = await doc.GetTextAsync(); 2254var text = await doc.GetTextAsync(); 2338var text = await doc.GetTextAsync(); 2780var text = await document.GetTextAsync(); 2799var text = await document.GetTextAsync(); 2818var text = await document.GetTextAsync(); 2873var doc2text = await doc2.GetTextAsync(); 2880var text = await document.GetTextAsync(); 2887var doc3text = await doc3.GetTextAsync(); 2896var noEncodingDocText = await noEncodingDoc.GetTextAsync(); 3234var text = await analyzerConfigDocument.GetTextAsync(); 3325var text = await document.GetTextAsync();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Formatting\FormattingTestBase.cs (1)
58await AssertFormatAsync(workspace.Services.SolutionServices, expected, root, spans.AsImmutable(), formattingOptions, await document.GetTextAsync());
Microsoft.CodeAnalysis.Workspaces.UnitTests (101)
CommandLineProject\CommandLineProjectWorkspaceTests.cs (1)
42var text = (await gooDoc.GetTextAsync()).ToString();
Formatter\FormatterTests.cs (2)
58var formattedText = await formattedDocument.GetTextAsync(); 95var formattedText = await formattedDocument.GetTextAsync();
LinkedFileDiffMerging\LinkedFileDiffMergingTests.cs (1)
53AssertEx.EqualOrDiff(expectedMergedText, mergedSolution.GetDocument(documentIds[i]).GetTextAsync().Result.ToString());
SolutionTests\ProjectSemanticVersionTests.cs (16)
43var text = await document.GetTextAsync(); 57var text = await document.GetTextAsync(); 71var text = await document.GetTextAsync(); 85var text = await document.GetTextAsync(); 99var text = await document.GetTextAsync(); 113var text = await document.GetTextAsync(); 127var text = await document.GetTextAsync(); 141var text = await document.GetTextAsync(); 155var text = await document.GetTextAsync(); 169var text = await document.GetTextAsync(); 183var text = await document.GetTextAsync(); 197var text = await document.GetTextAsync(); 211var text = await document.GetTextAsync(); 225var text = await document.GetTextAsync(); 239var text = await document.GetTextAsync(); 253var text = await document.GetTextAsync();
SolutionTests\SolutionTests.cs (50)
435var text1 = await document1.GetTextAsync(); 436var text2 = await document2.GetTextAsync(); 458text1 = await document1.GetTextAsync(); 459text2 = await document2.GetTextAsync(); 479text1 = await document1.GetTextAsync(); 480text2 = await document2.GetTextAsync(); 523var text1 = await document1.GetTextAsync(); 524var text2 = await document2.GetTextAsync(); 546text1 = await document1.GetTextAsync(); 547text2 = await document2.GetTextAsync(); 567text1 = await document1.GetTextAsync(); 568text2 = await document2.GetTextAsync(); 602var text1 = await document1.GetTextAsync(); 603var text2 = await document2.GetTextAsync(); 629text1 = await document1.GetTextAsync(); 630text2 = await document2.GetTextAsync(); 653text1 = await document1.GetTextAsync(); 654text2 = await document2.GetTextAsync(); 688var text1 = await document1.GetTextAsync(); 689var text2 = await document2.GetTextAsync(); 712text1 = await document1.GetTextAsync(); 713text2 = await document2.GetTextAsync(); 733text1 = await document1.GetTextAsync(); 734text2 = await document2.GetTextAsync(); 765var text1 = await document1.GetTextAsync(); 766var text2 = await document2.GetTextAsync(); 788text1 = await document1.GetTextAsync(); 789text2 = await document2.GetTextAsync(); 809text1 = await document1.GetTextAsync(); 810text2 = await document2.GetTextAsync(); 853var text1 = await document1.GetTextAsync(); 854var text2 = await document2.GetTextAsync(); 875text1 = await document1.GetTextAsync(); 876text2 = await document2.GetTextAsync(); 898text1 = await document1.GetTextAsync(); 899text2 = await document2.GetTextAsync(); 1650Assert.Equal(expectedAlgorithm, (await document.GetTextAsync(default)).ChecksumAlgorithm); 2452var sourceText = await document.GetTextAsync(); 3198var newText = solution2.GetDocument(documentId).GetTextAsync().Result.ToString(); 3343var observedText2 = sol.GetDocument(did).GetTextAsync().Result; 3361var docText = doc.GetTextAsync().Result; 3383var docText = doc.GetTextAsync().Result; 3408var docText = doc.GetTextAsync().Result; 3556var observedText = solution.GetDocument(documentId).GetTextAsync().Result; 3587var observedText = solution.GetDocument(documentId).GetTextAsync().Result; 3949var text = await doc.GetTextAsync().ConfigureAwait(false); 4034Assert.Equal(Encoding.UTF32, doc.GetTextAsync().Result.Encoding); 4041Assert.Equal(Encoding.UTF32, newDoc.GetTextAsync().Result.Encoding); 5488var newDocText = await newDoc.GetTextAsync(); 5489var sameText = await newDoc.GetTextAsync();
SolutionTests\SolutionWithSourceGeneratorTests.cs (28)
566var existingText = await project.Documents.Single().GetTextAsync(); 601Assert.Same(differentOpenTextContainer.CurrentText, await generatedDocument.GetTextAsync()); 649Assert.Same(differentOpenTextContainer.CurrentText, await generatedDocument.GetTextAsync()); 817.AddDocument(originalDocument1.Name, await originalDocument1.GetTextAsync().ConfigureAwait(false), filePath: originalDocument1.FilePath); 890Assert.Equal("// Frozen Document", (await frozenWithSingleDocument.GetTextAsync()).ToString()); 918Assert.Equal("// Frozen 1", (await (await solutionWithFrozenDocuments.GetRequiredProject(projectId1).GetSourceGeneratedDocumentsAsync()).Single().GetTextAsync()).ToString()); 919Assert.Equal("// Frozen 2", (await (await solutionWithFrozenDocuments.GetRequiredProject(projectId2).GetSourceGeneratedDocumentsAsync()).Single().GetTextAsync()).ToString()); 1005var sourceText = await updatedDocument.GetTextAsync(); 1008sourceText = await solution.GetRequiredDocument(ordinaryDocument.Id).GetTextAsync(); 1033var sourceText = await sourceGeneratedDocument.GetTextAsync(); 1038sourceText = await updatedDocument.GetTextAsync(); 1067var sourceText = await sourceGeneratedDocument.GetTextAsync(); 1075sourceText = await updatedDocument.GetTextAsync(); 1102var sourceText = await sourceGeneratedDocument.GetTextAsync(); 1156var sourceText = await sourceGeneratedDocument.GetTextAsync(); 1161sourceText = await updatedDocument.GetTextAsync(); 1184var sourceText = await sourceGeneratedDocument.GetTextAsync(); 1188sourceText = await sourceGeneratedDocument.GetTextAsync(); 1193sourceText = await updatedDocument.GetTextAsync(); 1221var sourceText = await sourceGeneratedDocument1!.GetTextAsync(); 1230sourceText = await sourceGeneratedDocument1!.GetTextAsync(); 1235sourceText = await sourceGeneratedDocument2!.GetTextAsync(); 1242sourceText = await sourceGeneratedDocument1!.GetTextAsync(); 1247sourceText = await sourceGeneratedDocument2!.GetTextAsync(); 1278Assert.Equal("// Frozen Document", (await frozenWithSingleDocument.GetTextAsync()).ToString()); 1315Assert.Equal("// Frozen Document", (await frozenWithSingleDocument.GetTextAsync()).ToString()); 1346Assert.Equal("// Frozen Document", (await frozenWithSingleDocument.GetTextAsync()).ToString()); 1381Assert.Equal("// Frozen Document", (await frozenWithSingleDocument.GetTextAsync()).ToString());
WorkspaceTests\AdhocWorkspaceTests.cs (3)
76Assert.Equal(source, (await doc.GetTextAsync()).ToString()); 338currentText = await doc.GetTextAsync(); 366var actualText = await newDoc.GetTextAsync();
Microsoft.Gen.ComplianceReports.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.ContextualOptions.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.Logging.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.MetadataExtractor.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.Metrics.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.Gen.MetricsReports.Unit.Tests (4)
test\Generators\Shared\RoslynTestUtils.cs (4)
512var s = await proj.FindDocument(l[i]).GetTextAsync().ConfigureAwait(false); 520var s = await proj.FindDocument($"src-{i}.cs").GetTextAsync().ConfigureAwait(false); 527var s = await proj.FindDocument(extraFile).GetTextAsync().ConfigureAwait(false); 548var newText = await document.GetTextAsync().ConfigureAwait(false);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
SemanticSearch\SemanticSearchQueryExecutor.cs (1)
63query ??= (await queryDocument!.GetTextAsync(cancellationToken).ConfigureAwait(false)).ToString();
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
CodeModel\FileCodeFunctionTests.cs (2)
489var text = await (GetCurrentDocument()).GetTextAsync(); 502var text = await (GetCurrentDocument()).GetTextAsync();
Microsoft.VisualStudio.LanguageServices.UnitTests (17)
Preview\PreviewChangesTests.vb (12)
40Dim text = document.GetTextAsync().Result 93Dim text = document.GetTextAsync().Result 135Dim text = document.GetTextAsync().Result 158Dim finalText = previewEngine.FinalSolution.GetDocument(documentId).GetTextAsync().Result.ToString() 159Assert.Equal(document.GetTextAsync().Result.ToString(), finalText) 188Dim text = document.GetTextAsync().Result 234Dim changedDocText = finalSolution.GetDocument(docId).GetTextAsync().Result.ToString() 235Assert.Equal(forkedDocument.GetTextAsync().Result.ToString(), changedDocText) 237Dim finalAddedDocText = finalSolution.GetDocument(addedDocumentId1).GetTextAsync().Result.ToString() 240Dim finalNotRemovedDocText = finalSolution.GetDocument(removedDocumentId2).GetTextAsync().Result.ToString() 274Dim text1 = document1.GetTextAsync().Result 277Dim text2 = document2.GetTextAsync().Result
Venus\DocumentService_IntegrationTests.vb (5)
84Dim definitionText = Await workspace.CurrentSolution.GetDocument(definitionDocument.Id).GetTextAsync() 152Dim definitionText = Await workspace.CurrentSolution.GetDocument(definitionDocument.Id).GetTextAsync() 191Assert.Equal(String.Empty, (Await newDocument.GetTextAsync()).ToString()) 277Dim mappedSource = Await mappedDocument.GetTextAsync(cancellationToken).ConfigureAwait(False) 315Dim mappedSource = Await mappedDocument.GetTextAsync(cancellationToken).ConfigureAwait(False)
Roslyn.Diagnostics.Analyzers (2)
src\RoslynAnalyzers\Utilities\Refactoring\CodeRefactoringContextExtensions.cs (1)
44var text = await document.GetTextAsync(cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
20return new ValueTask<SourceText>(document.GetTextAsync(cancellationToken));
Roslyn.VisualStudio.Next.UnitTests (13)
Remote\SnapshotSerializationTests.cs (1)
535var text = await document.GetTextAsync().ConfigureAwait(false);
Services\ServiceHubServicesTests.cs (12)
102var oldText = await oldDocument.GetTextAsync(); 502var localText = await localDoc.GetTextAsync(); 503var remoteText = await localDoc.GetTextAsync(); 1382Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1395Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1400Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1423Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1444Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1451Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1458Assert.Equal("// callCount: 1", (await document.GetTextAsync()).ToString()); 1463Assert.Equal("// callCount: 0", (await document.GetTextAsync()).ToString()); 1593var text = await document.GetTextAsync();
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
20return new ValueTask<SourceText>(document.GetTextAsync(cancellationToken));