36 references to TryGetText
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\TextDocumentExtensions.cs (1)
17if (document.TryGetText(out var text))
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (1)
58Assert.True(analyzerConfigDocument!.TryGetText(out var actualText));
Microsoft.CodeAnalysis.EditorFeatures (4)
EditAndContinue\ActiveStatementTrackingService.cs (1)
299if (!document.TryGetText(out var source))
RenameTracking\RenameTrackingTaggerProvider.cs (2)
74document.TryGetText(out var text)) 112if (document != null && document.TryGetText(out var text))
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
89if (_document.TryGetText(out var text))
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
FindReferences\FindReferencesTests.vb (1)
405doc.TryGetText(text)
Microsoft.CodeAnalysis.Features (4)
ExternalAccess\UnitTesting\SolutionCrawler\AbstractUnitTestingDocumentDifferenceService.cs (2)
29if (!oldDocument.TryGetText(out var oldText) || 30!newDocument.TryGetText(out var newText))
SolutionCrawler\AbstractDocumentDifferenceService.cs (2)
30if (!oldDocument.TryGetText(out var oldText) || 31!newDocument.TryGetText(out var newText))
Microsoft.CodeAnalysis.Workspaces (7)
CodeCleanup\Providers\FormatCodeCleanupProvider.cs (1)
27return document.TryGetText(out var oldText)
Workspace\Solution\Document.cs (2)
438if (this.TryGetText(out var text) && oldDocument.TryGetText(out var oldText))
Workspace\Workspace.cs (2)
1962if (!oldDoc.TryGetText(out var oldText)) 1970else if (!newDoc.TryGetText(out var newText))
Workspace\Workspace_Editor.cs (2)
396if (oldDocument.TryGetText(out var oldText) && 854Contract.ThrowIfFalse(doc.TryGetText(out var text));
Microsoft.CodeAnalysis.Workspaces.UnitTests (18)
SolutionTests\SolutionTests.cs (5)
377Assert.True(newSolution1.GetDocument(documentId)!.TryGetText(out var actualText)); 923Assert.True(newSolution1.GetAdditionalDocument(documentId)!.TryGetText(out var actualText)); 945Assert.True(newSolution1.GetAdditionalDocument(documentId)!.TryGetText(out var actualText)); 969Assert.True(newSolution1.GetAnalyzerConfigDocument(documentId)!.TryGetText(out var actualText)); 991Assert.True(newSolution1.GetAnalyzerConfigDocument(documentId)!.TryGetText(out var actualText));
WorkspaceTests\AdhocWorkspaceTests.cs (13)
227Assert.False(doc.TryGetText(out var currentText)); 232Assert.True(doc.TryGetText(out currentText)); 240Assert.False(doc.TryGetText(out currentText)); 261Assert.False(doc.TryGetText(out var currentText)); 266Assert.True(doc.TryGetText(out currentText)); 274Assert.False(doc.TryGetText(out currentText)); 300Assert.False(doc.TryGetText(out var currentText)); 305Assert.True(doc.TryGetText(out currentText)); 313Assert.False(doc.TryGetText(out currentText)); 334Assert.False(doc.TryGetText(out var currentText)); 339Assert.True(doc.TryGetText(out currentText)); 351Assert.False(newDoc.TryGetText(out currentText)); 363Assert.False(newDoc.TryGetText(out currentText));