11 overrides of GetText
Microsoft.CodeAnalysis.CSharp (3)
Syntax\CSharpSyntaxTree.Dummy.cs (1)
33public override SourceText GetText(CancellationToken cancellationToken)
Syntax\CSharpSyntaxTree.LazySyntaxTree.cs (1)
44public override SourceText GetText(CancellationToken cancellationToken)
Syntax\CSharpSyntaxTree.ParsedSyntaxTree.cs (1)
62public override SourceText GetText(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
DeclarationTests.cs (1)
973public override SourceText GetText(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Syntax\Mocks\MockCSharpSyntaxTree.cs (1)
34public override SourceText GetText(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Workspace\LanguageServices\CSharpSyntaxTreeFactoryService.ParsedSyntaxTree.cs (1)
45public override SourceText GetText(CancellationToken cancellationToken)
Microsoft.CodeAnalysis.VisualBasic (3)
Syntax\VisualBasicSyntaxTree.DummySyntaxTree.vb (1)
28Public Overrides Function GetText(Optional cancellationToken As CancellationToken = Nothing) As SourceText
Syntax\VisualBasicSyntaxTree.LazySyntaxTree.vb (1)
51Public Overrides Function GetText(Optional cancellationToken As CancellationToken = Nothing) As SourceText
Syntax\VisualBasicSyntaxTree.ParsedSyntaxTree.vb (1)
75Public Overrides Function GetText(Optional cancellationToken As CancellationToken = Nothing) As SourceText
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (1)
ParserTestUtilities.vb (1)
519Public Overrides Function GetText(Optional cancellationToken As CancellationToken = Nothing) As SourceText
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Workspace\LanguageServices\VisualBasicSyntaxTreeFactoryService.ParsedSyntaxTree.vb (1)
42Public Overrides Function GetText(Optional cancellationToken As CancellationToken = Nothing) As SourceText
309 references to GetText
BuildValidator (1)
CompilationDiff.cs (1)
308tree.GetText().Write(writer);
IdeCoreBenchmarks (1)
IncrementalSourceGeneratorBenchmarks.cs (1)
159var sourceText = syntaxTree.GetText();
Microsoft.AspNetCore.App.Analyzers (1)
Infrastructure\VirtualChars\CSharpVirtualCharService.cs (1)
199var parentSourceText = parentExpression.SyntaxTree.GetText();
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
148var sourceText = token.SyntaxTree.GetText();
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
136var text = syntaxTree.GetText();
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
136var text = syntaxTree.GetText();
Microsoft.CodeAnalysis (15)
CommandLine\CommonCompiler.cs (2)
464text = EmbeddedText.FromSource(path, tree.GetText()); 1164var sourceText = tree.GetText(cancellationToken);
Compilation\Compilation.cs (1)
2489if (!string.IsNullOrEmpty(tree.FilePath) && tree.GetText().Encoding == null)
Compilation\DeterministicKey.cs (1)
44=> _tree.GetText(cancellationToken);
DiagnosticAnalyzer\AnalysisContextInfo.cs (1)
111var text = _file.Value.SourceTree.GetText();
Syntax\LineDirectiveMap.cs (1)
148var sourceText = tree.GetText();
Syntax\SyntaxDiffer.cs (2)
45return new[] { new TextChange(new TextSpan(0, 0), after.GetText().ToString()) }; 81return new[] { new TextSpan(0, after!.GetText().Length) };
Syntax\SyntaxTree.cs (3)
121return Task.FromResult(this.TryGetText(out SourceText? text) ? text : this.GetText(cancellationToken)); 374var text = this.GetText(); 416return this.GetText(CancellationToken.None).ToString();
Syntax\SyntaxTreeComparer.cs (3)
28SourceTextComparer.Instance.Equals(x.GetText(), y.GetText()); 33return Hash.Combine(obj.FilePath.GetHashCode(), SourceTextComparer.Instance.GetHashCode(obj.GetText()));
Syntax\SyntaxTreeExtensions.cs (1)
23var text = tree.GetText();
Microsoft.CodeAnalysis.CodeStyle (12)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
49var oldText = tree.GetText(cancellationToken);
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
131var lines = parenthesizedExpression.SyntaxTree.GetText(cancellationToken).Lines;
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
23var text = tree.GetText();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (2)
25var text = tree.GetText(cancellationToken); 102var text = tree.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
166var textLine = baseToken.SyntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(baseToken.SpanStart);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (4)
51if (root.SyntaxTree != null && root.SyntaxTree.GetText() != null) 53return root.SyntaxTree.GetText(); 57if (parent != null && parent.SyntaxTree != null && parent.SyntaxTree.GetText() != null) 59return parent.SyntaxTree.GetText();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
86var line = syntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(spanStart);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (1)
152var line = tree.GetText().Lines.GetLineFromPosition(startPosition);
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (2)
25var sourceText = declaration.SyntaxTree.GetText(cancellationToken); 159var text = parameters[0].SyntaxTree.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
59var text = root.SyntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.CSharp (9)
Compilation\CSharpCompilation.cs (1)
1094var text = tree.GetText();
Compilation\CSharpSemanticModel.cs (1)
5217var text = tree.GetText(cancellationToken);
Symbols\Source\SourceMethodSymbolWithAttributes.cs (2)
1077var referencedLines = matchingTree.GetText().Lines; 1273var referencedLines = matchingTree.GetText().Lines;
Syntax\CSharpSyntaxTree.cs (5)
666=> GetDirectiveMap().TranslateSpan(GetText(cancellationToken), this.FilePath, span); 670=> GetDirectiveMap().GetLineVisibility(GetText(cancellationToken), position); 677return (map.Entries.Length == 1) ? Array.Empty<LineMapping>() : map.GetLineMappings(GetText(cancellationToken).Lines); 688=> GetDirectiveMap().TranslateSpanAndVisibility(GetText(), FilePath, span, out isHiddenPosition); 753=> GetText(cancellationToken).Lines.GetLinePosition(position);
Microsoft.CodeAnalysis.CSharp.CodeStyle (6)
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
51var text = tree.GetText(cancellationToken);
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
69var sourceText = context.Tree.GetText(context.CancellationToken);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
105var sourceText = semanticModel.SyntaxTree.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
188var parentSourceText = parentExpression.SyntaxTree.GetText();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
239var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
347var sourceText = token.SyntaxTree!.GetText(cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (1)
145var text = node.SyntaxTree.GetText();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (2)
Extensions\SyntaxTreeExtensionsTests.cs (2)
18var line = tree.GetText().Lines[lineNumber]; 27var line = tree.GetText().Lines[lineNumber];
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
140var sourceText = token.SyntaxTree.GetText();
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (3)
PDB\PDBEmbeddedSourceTests.cs (3)
47EmbeddedText.FromSource(tree1.FilePath, tree1.GetText()), 48EmbeddedText.FromSource(tree2.FilePath, tree2.GetText()) 109embeddedTexts: new[] { EmbeddedText.FromSource(tree.FilePath, tree.GetText()) });
Microsoft.CodeAnalysis.CSharp.Features (18)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (2)
92var text = tree.GetText(cancellationToken); 116while (IsOnSameLine(token, touchingToken, tree.GetText(cancellationToken)))
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (1)
501text ??= stringExpression.SyntaxTree.GetText(cancellationToken);
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
155var line = _syntaxTree.GetText(cancellationToken).Lines.IndexOf(_position); 160nextStatement != null && _syntaxTree.GetText(cancellationToken).Lines.IndexOf(nextStatement.SpanStart) == line;
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
231if (position >= syntaxTree.GetText(cancellationToken).Length)
EditAndContinue\BreakpointSpans.cs (1)
20var source = tree.GetText(cancellationToken);
EmbeddedLanguages\CSharpTestEmbeddedLanguageClassifier.cs (1)
72var text = semanticModel.SyntaxTree.GetText(cancellationToken);
LineSeparators\CSharpLineSeparatorService.cs (3)
332var line = syntaxTree.GetText(cancellationToken).Lines.IndexOf(textSpan.End); 333if (line == syntaxTree.GetText(cancellationToken).Lines.Count - 1) 338if (string.IsNullOrWhiteSpace(syntaxTree.GetText(cancellationToken).Lines[line + 1].ToString()))
src\Analyzers\CSharp\Analyzers\NewLines\ConsecutiveBracePlacement\ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
51var text = tree.GetText(cancellationToken);
src\Analyzers\CSharp\Analyzers\NewLines\ConstructorInitializerPlacement\ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
69var sourceText = context.Tree.GetText(context.CancellationToken);
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForFluentDiagnosticAnalyzer.cs (1)
105var sourceText = semanticModel.SyntaxTree.GetText(cancellationToken);
Structure\Providers\ArgumentListStructureProvider.cs (1)
36var text = node.SyntaxTree.GetText(cancellationToken);
Structure\Providers\DisabledTextTriviaStructureProvider.cs (1)
71var text = syntaxTree.GetText(cancellationToken);
Structure\Providers\IfDirectiveTriviaStructureProvider.cs (1)
40text ??= node.SyntaxTree.GetText(cancellationToken);
Structure\Providers\StringLiteralExpressionStructureProvider.cs (1)
44var sourceText = node.SyntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
ScriptTests.cs (2)
67Assert.Equal(state.Script.Code, compilation.SyntaxTrees.First().GetText().ToString()); 75Assert.Equal(state.Script.SourceText, compilation.SyntaxTrees.First().GetText());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (16)
Semantics\BindingAwaitTests.cs (1)
27SourceText text = tree.GetText();
Semantics\InterceptorsTests.cs (2)
3281builder.WriteBytes(sourceTree.GetText().GetContentHash()); 3331builder.WriteBytes(sourceTree.GetText().GetContentHash());
Semantics\LocalFunctionTests.cs (12)
7344var localFuncPosition = tree.GetText().ToString().IndexOf("void local<TParameter>()", StringComparison.Ordinal) - 1; 7345var methodPosition = tree.GetText().ToString().IndexOf("void M2<TParameter>()", StringComparison.Ordinal) - 1; 7497var localFuncPosition = tree.GetText().ToString().IndexOf("[My(a)]", StringComparison.Ordinal); 7498var methodPosition = tree.GetText().ToString().IndexOf("[My(b)]", StringComparison.Ordinal); 7571var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 7572var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal); 8927var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 8928var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal); 9431var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 9432var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal); 9749var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 9750var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal);
Semantics\TopLevelStatementsTests.cs (1)
8795Assert.Equal(text2, tree.GetText().ToString());
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (15)
Compilation\SemanticModelAPITests.cs (3)
3524var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal); 3545var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal); 4369var text = tree.GetText().ToString();
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (7)
4088var position1 = tree.GetText().ToString().IndexOf("WriteLine", StringComparison.Ordinal); 4169var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal); 4212var position2 = tree.GetText().ToString().IndexOf("C goo<O>", StringComparison.Ordinal); 4221var position3 = tree.GetText().ToString().IndexOf("Serializable", StringComparison.Ordinal); 4247var position = tree.GetText().ToString().IndexOf("class C {", StringComparison.Ordinal); 4324var position2 = tree.GetText().ToString().IndexOf("C goo<O>", StringComparison.Ordinal); 4347var position3 = tree.GetText().ToString().IndexOf("Serializable", StringComparison.Ordinal);
DeclarationTests.cs (1)
975return _underlyingTree.GetText(cancellationToken);
Symbols\Metadata\MetadataTypeTests.cs (2)
363var oldIText = oldTree.GetText(); 378oldIText = oldTree.GetText();
Symbols\Source\DeclaringSyntaxNodeTests.cs (2)
138string code = tree.GetText().ToString(); 153string code = tree.GetText().ToString();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (57)
Diagnostics\DiagnosticTest.cs (1)
2406string s = syntaxTree.GetText().ToString();
Diagnostics\LocationsTests.cs (5)
68string s = syntaxTree.GetText().ToString(); 76var text = tree.GetText(); 400Assert.InRange(diag.Location.SourceSpan.End, diag.Location.SourceSpan.Start, syntaxTree.GetText().Length); 465Assert.InRange(diag.Location.SourceSpan.Start, 0, syntaxTree.GetText().Length); 466Assert.InRange(diag.Location.SourceSpan.End, 0, syntaxTree.GetText().Length);
IncrementalParsing\GrammarAmbiguities.cs (1)
104var parsedRoot = SyntaxFactory.ParseCompilationUnit(syntaxTree.GetText().ToString());
IncrementalParsing\IncrementalParsingTests.cs (36)
495var text = tree.GetText(); 527var text = tree.GetText(); 568var text = tree.GetText(); 619var initialText = initialTree.GetText(); 1740Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 1795Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 1882Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 2899var oldIText = oldTree.GetText(); 2913oldIText = oldTree.GetText(); 2977var currIText = currTree.GetText(); 3017var currIText = currTree.GetText(); 3197var text = tree.GetText(); 3218var text = tree.GetText(); 3239var text = tree.GetText(); 3260var text = tree.GetText(); 3281var text = tree.GetText(); 3302var text = tree.GetText(); 3326var text = tree.GetText(); 3350var text = tree.GetText(); 3374var text = tree.GetText(); 3398var text = tree.GetText(); 3422var text = tree.GetText(); 3448var text = tree.GetText(); 3474var text = tree.GetText(); 3499var text = tree.GetText(); 3525var text = tree.GetText(); 3543var text = tree.GetText(); 3561var text = tree.GetText(); 3579var text = tree.GetText(); 3594var text = tree.GetText(); 3608var text = tree.GetText(); 3622var text = tree.GetText(); 3660var text = tree.GetText();
Parsing\ParserRegressionTests.cs (1)
163var lines1 = tree.GetText().Lines.Count; // 3
Syntax\SyntaxEquivalenceTests.cs (2)
21var tree3 = SyntaxFactory.ParseSyntaxTree(tree2.GetText().ToString()); 30var tree3 = SyntaxFactory.ParseSyntaxTree(tree2.GetText().ToString());
Syntax\SyntaxFactoryTests.cs (2)
45var text = SyntaxFactory.SyntaxTree(SyntaxFactory.CompilationUnit(), encoding: null).GetText(); 53var text = SyntaxFactory.CompilationUnit().SyntaxTree.GetText();
Syntax\SyntaxNodeTests.cs (3)
764var position = tree.GetText().Lines[2].End - 1; 886var tree2 = tree1.WithChangedText(tree1.GetText().WithChanges(new TextChange(default, " "))); 897var tree2 = tree1.WithChangedText(tree1.GetText().WithChanges(new TextChange(new TextSpan(22, 0), " return; ")));
Syntax\SyntaxTreeTests.cs (6)
122Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm); 134Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm); 247var newText = newTree.GetText(); 265var newText = newTree.GetText(); 289var newText = newTree.GetText(); 305var newText = newTree.GetText();
Microsoft.CodeAnalysis.CSharp.Test.Utilities (4)
SyntaxTreeExtensions.cs (4)
19var oldFullText = syntaxTree.GetText(); 26var oldFullText = syntaxTree.GetText().ToString(); 34var oldFullText = syntaxTree.GetText().ToString(); 47var oldFullText = syntaxTree.GetText().ToString();
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\EmbeddedLanguages\VirtualChars\CSharpVirtualCharService.cs (1)
188var parentSourceText = parentExpression.SyntaxTree.GetText();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
239var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs (1)
347var sourceText = token.SyntaxTree!.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Indentation\CSharpIndentationService.cs (1)
145var text = node.SyntaxTree.GetText();
Microsoft.CodeAnalysis.EditorFeatures (1)
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
186var fullText = syntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (2)
75var actualText = tree.GetText().ToString(highlightSpans[j]); 81var expectedText = tree.GetText().ToString(expectedHighlightSpans[j]);
Microsoft.CodeAnalysis.Features (6)
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
275var lines = syntaxTree.GetText(cancellationToken).Lines;
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
112var sourceText = semanticModel.SyntaxTree.GetText(cancellationToken);
Snippets\SnippetProviders\AbstractInlineStatementSnippetProvider.cs (2)
105var sourceText = parentNode.SyntaxTree.GetText(cancellationToken); 138var sourceText = parentNode.SyntaxTree.GetText(cancellationToken);
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (1)
49var oldText = tree.GetText(cancellationToken);
src\Analyzers\Core\Analyzers\RemoveUnnecessaryParentheses\AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
131var lines = parenthesizedExpression.SyntaxTree.GetText(cancellationToken).Lines;
Microsoft.CodeAnalysis.Features.Test.Utilities (4)
EditAndContinue\ActiveStatementsDescription.cs (1)
88var newText = newTree.GetText();
EditAndContinue\EditAndContinueTestVerifier.cs (1)
483var text = tree.GetText();
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
397Generate(syntaxTree.GetText().ToString(), fileName);
EditAndContinue\RuntimeRudeEditDescription.cs (1)
14=> new RudeEditDiagnostic(kind, tree.GetText().Lines.GetTextSpan(new LinePositionSpan(position, position)), syntaxKind: 0, arguments).ToDiagnostic(tree).ToString();
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (1)
262var text = tree.GetText(cancellationToken);
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
85.Select(st => (path: st.FilePath, text: st.GetText()))
Microsoft.CodeAnalysis.Rebuild.UnitTests (3)
CompilationRebuildArtifactResolver.cs (1)
31.Select(x => x.GetText())
CSharpRebuildTests.cs (1)
38.Select(x => compilationFactory.CreateSyntaxTree(x.FilePath, x.GetText()))
DeterministicKeyBuilderTests.cs (1)
283var contentChecksum = GetChecksum(syntaxTree.GetText());
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\IRuntimeEnvironment.cs (1)
252.Select(t => (filePath: t.FilePath, text: t.GetText()))
CompilationVerifier.cs (1)
647ILValidation.GetSequencePointMarkers(xmlMethod, id => _compilation.SyntaxTrees.Single(tree => tree.FilePath == documentMap[id]).GetText()) :
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1826context.TryGetValue(treeContext.Tree.GetText(), _textValueProvider, out var length);
Diagnostics\DiagnosticDescription.cs (2)
161_squiggledText = _location.SourceTree.GetText().ToString(_location.SourceSpan); 543assertText.AppendLine(l.SourceTree.GetText().Lines.GetLineFromPosition(l.SourceSpan.Start).ToString());
Microsoft.CodeAnalysis.VisualBasic (6)
CommandLine\CommandLineDiagnosticFormatter.vb (1)
132text = diagnostic.Location.SourceTree.GetText()
Syntax\VisualBasicSyntaxTree.vb (5)
449Return GetDirectiveMap().TranslateSpan(GetText(cancellationToken), FilePath, span) 454Return GetDirectiveMap().GetLineVisibility(Me.GetText(cancellationToken), position) 458Return GetDirectiveMap().TranslateSpanAndVisibility(Me.GetText(), Me.FilePath, span, isHiddenPosition) 465Return If(map.Entries.Length = 1, Array.Empty(Of LineMapping)(), map.GetLineMappings(GetText(cancellationToken).Lines)) 485Return Me.GetText().Lines.GetLinePosition(position)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (1)
202Dim text = token.SyntaxTree.GetText()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (2)
358Dim line = syntaxTree.GetText(cancellationToken).Lines(lineNumber) 363syntaxTree.GetText(cancellationToken).Lines.IndexOf(statement.SpanStart) = lineNumber Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (1)
125Dim sourceText = node.SyntaxTree.GetText()
Microsoft.CodeAnalysis.VisualBasic.Features (6)
Debugging\ProximityExpressionsGetter.Worker.vb (2)
86Dim line = _syntaxTree.GetText(cancellationToken).Lines.IndexOf(_position) 89While nextStatement IsNot Nothing AndAlso _syntaxTree.GetText(cancellationToken).Lines.IndexOf(nextStatement.SpanStart) = line
DocumentationComments\VisualBasicDocumentationCommentSnippetService.vb (1)
230If position >= syntaxTree.GetText(cancellationToken).Length Then
EditAndContinue\BreakpointSpans.vb (1)
14Dim source = tree.GetText(cancellationToken)
Highlighting\KeywordHighlightingHelpers.vb (1)
88Dim text = node.SyntaxTree.GetText(cancellationToken)
Structure\Providers\XmlExpressionStructureProvider.vb (1)
27Dim line = syntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(span.Start)
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (7)
Binding\BindingScopeTests.vb (1)
18Dim treeText As String = tree.GetText().ToString()
Compilation\MyTemplateTests.vb (3)
51Dim sourceText = MyTemplate.GetText() 75Dim text = MyTemplate.GetText.ToString 98Dim text = MyTemplate.GetText.ToString
DeclaringSyntaxNodeTests.vb (3)
104Dim code As String = tree.GetText().ToString() 118Dim code As String = tree.GetText().ToString() 129Dim code As String = tree.GetText().ToString()
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (16)
DocumentationComments\DocCommentTests.vb (1)
12084Dim text As String = tree.GetText().ToString()
SymbolsTests\Source\SourceSymbolTests.vb (15)
341Assert.Equal("C", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 343Assert.Equal("C", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 350Assert.Equal("D", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 352Assert.Equal("D", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 359Assert.Equal("T", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 361Assert.Equal("T", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 367Assert.Equal("m1", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 373Assert.Equal("x", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 379Assert.Equal("v1$", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 386Assert.Equal("N1", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 388Assert.Equal("N1", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 395Assert.Equal("N2", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 397Assert.Equal("N2", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 404Assert.Equal("N3", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 406Assert.Equal("N3", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (19)
IncrementalParser\IncrementalParser.vb (5)
1121Dim oldIText = tree.GetText() 1143Dim fullText = fullTree.GetText() 1158Dim oldIText = tree.GetText() 1186Dim fullText = fullTree.GetText() 1204Dim oldText = tree.GetText()
LocationTests.vb (3)
56Dim s = tree.GetText().ToString() 63Dim text = tree.GetText() 255Dim text = tree.GetText()
Parser\ParseDirectives.vb (1)
3387Dim index = tree.GetText.ToString.IndexOf(text, 0, StringComparison.Ordinal)
Syntax\SyntaxEquivalenceTests.vb (2)
18Dim tree3 = VisualBasicSyntaxTree.ParseText(tree2.GetText().ToString()) 25Dim tree3 = VisualBasicSyntaxTree.ParseText(tree2.GetText().ToString())
Syntax\SyntaxFactoryTests.vb (2)
14Dim text = SyntaxFactory.SyntaxTree(SyntaxFactory.CompilationUnit(), encoding:=Nothing).GetText() 21Dim text = SyntaxFactory.CompilationUnit().SyntaxTree.GetText()
Syntax\SyntaxTreeTests.vb (5)
18Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm) 114Dim newText = newTree.GetText() 131Dim newText = newTree.GetText() 154Dim newText = newTree.GetText() 168Dim newText = newTree.GetText()
TestSyntaxNodes.vb (1)
2349Dim position = tree.GetText().Lines(1).End
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (9)
CompilationTestUtils.vb (4)
659Dim text As String = tree.GetText().ToString() 667Dim text As String = tree.GetText().ToString() 1009Dim lineText As String = GetLineText(sourceLocation.SourceTree.GetText(), sourceLocation.SourceSpan.Start, offsetInLine) 1131Dim text As String = tree.GetText().ToString()
SemanticModelTestBase.vb (1)
23Dim text As String = tree.GetText().ToString()
SyntaxTreeExtensions.vb (4)
17Dim oldFullText = syntaxTree.GetText() 24Dim oldFullText = syntaxTree.GetText().ToString() 32Dim oldFullText = syntaxTree.GetText().ToString() 45Dim oldFullText = syntaxTree.GetText().ToString()
Microsoft.CodeAnalysis.VisualBasic.Workspaces (5)
Simplification\Reducers\VisualBasicEscapingReducer.vb (1)
153Dim text = parent.SyntaxTree.GetText(cancellationToken)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb (1)
202Dim text = token.SyntaxTree.GetText()
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb (2)
358Dim line = syntaxTree.GetText(cancellationToken).Lines(lineNumber) 363syntaxTree.GetText(cancellationToken).Lines.IndexOf(statement.SpanStart) = lineNumber Then
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\VisualBasic\Indentation\SpecialFormattingOperation.vb (1)
125Dim sourceText = node.SyntaxTree.GetText()
Microsoft.CodeAnalysis.Workspaces (14)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
23var text = tree.GetText();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs (2)
25var text = tree.GetText(cancellationToken); 102var text = tree.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\BottomUpBaseIndentationFinder.cs (1)
166var textLine = baseToken.SyntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(baseToken.SpanStart);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.StructuredTrivia.cs (4)
51if (root.SyntaxTree != null && root.SyntaxTree.GetText() != null) 53return root.SyntaxTree.GetText(); 57if (parent != null && parent.SyntaxTree != null && parent.SyntaxTree.GetText() != null) 59return parent.SyntaxTree.GetText();
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Services\SyntaxFacts\AbstractDocumentationCommentService.cs (1)
86var line = syntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(spanStart);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (1)
152var line = tree.GetText().Lines.GetLineFromPosition(startPosition);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Editing\AddParameterEditor.cs (2)
25var sourceText = declaration.SyntaxTree.GetText(cancellationToken); 159var text = parameters[0].SyntaxTree.GetText(cancellationToken);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Utilities\ParsedDocument.cs (1)
59var text = root.SyntaxTree.GetText(cancellationToken);
Workspace\Solution\DocumentState.cs (1)
547static (tree, c) => tree.GetText(c),
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2889Assert.Null(doc2tree.GetText().Encoding); 2902Assert.Equal(doc3text.Encoding, doc3tree.GetText().Encoding);
Microsoft.CodeAnalysis.Workspaces.UnitTests (12)
FindReferencesTests.cs (3)
175.AddDocument(docId, "testFile", tree.GetText()); 214.AddDocument(docId, "testFile", tree.GetText()); 278.AddDocument(docId, "testFile", tree.GetText());
SolutionTests\SolutionTests.cs (6)
305Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm); 2484Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm); 2513Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm); 3201var text2 = tree2.GetText(); 4556var sourceText = strongTree.GetText(); 5447var treeText = newDocTree.GetText();
SymbolKeyTests.cs (1)
1416var text = syntaxTree.GetText();
SyntaxPathTests.cs (2)
429var oldFullText = syntaxTree.GetText(); 437offset: syntaxTree.GetText().ToString().IndexOf(oldText, startIndex, StringComparison.Ordinal),
Microsoft.VisualStudio.LanguageServices (6)
CallHierarchy\CallHierarchyDetail.cs (3)
44var start = location.SourceTree.GetText().Lines[lineSpan.StartLinePosition.Line].Start; 45var end = location.SourceTree.GetText().Lines[lineSpan.EndLinePosition.Line].End; 46return location.SourceTree.GetText().GetSubText(TextSpan.FromBounds(start, end)).ToString();
Diagnostics\VisualStudioVenusSpanMappingService.cs (1)
75return location.SourceTree.GetText().Lines;
Progression\GraphQueries\IsUsedByGraphQuery.cs (1)
56var lineText = location.SourceTree.GetText(cancellationToken).Lines[span.StartLinePosition.Line].ToString();
TaskList\ProjectExternalErrorReporter.cs (1)
322var text = tree.GetText();
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (3)
1274var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None); 1354var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None); 1412var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None);
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
CodeModel\VisualBasicCodeModelService.vb (3)
2251Dim text = member.SyntaxTree.GetText(CancellationToken.None) 2480Dim text = member.SyntaxTree.GetText(CancellationToken.None) 2506Dim text = member.SyntaxTree.GetText(CancellationToken.None)