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)
450public 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)
39public 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)
37Public Overrides Function GetText(Optional cancellationToken As CancellationToken = Nothing) As SourceText
323 references to GetText
BuildValidator (1)
CompilationDiff.cs (1)
308tree.GetText().Write(writer);
IdeCoreBenchmarks (1)
IncrementalSourceGeneratorBenchmarks.cs (1)
170var sourceText = syntaxTree.GetText();
Microsoft.CodeAnalysis (15)
CommandLine\CommonCompiler.cs (2)
461text = EmbeddedText.FromSource(path, tree.GetText()); 1042var sourceText = tree.GetText(cancellationToken);
Compilation\Compilation.cs (1)
2445if (!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)); 360var text = this.GetText(); 402return 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 (13)
AbstractDocumentationCommentService.cs (1)
86var line = syntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(spanStart);
AbstractIndentation.Indenter.cs (1)
54Text = tree.GetText(cancellationToken);
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
132var lines = parenthesizedExpression.SyntaxTree.GetText(cancellationToken).Lines;
BottomUpBaseIndentationFinder.cs (1)
166var textLine = baseToken.SyntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(baseToken.SpanStart);
CommonFormattingHelpers.cs (1)
148var line = tree.GetText().Lines.GetLineFromPosition(startPosition);
FormattingAnalyzerHelper.cs (1)
23var oldText = tree.GetText(cancellationToken);
J\s\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
23var text = tree.GetText();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
25var text = tree.GetText(cancellationToken); 102var text = tree.GetText(cancellationToken);
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();
Microsoft.CodeAnalysis.CodeStyle.Fixes (3)
AddParameterEditor.cs (2)
25var sourceText = declaration.SyntaxTree.GetText(cancellationToken); 159var text = parameters[0].SyntaxTree.GetText(cancellationToken);
ParsedDocument.cs (1)
58var text = root.SyntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.CSharp (6)
Binder\Binder_InterpolatedString.cs (1)
78var text = node.SyntaxTree.GetText();
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); 762=> GetText(cancellationToken).Lines.GetLinePosition(position);
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
50var text = tree.GetText(cancellationToken);
ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
65var sourceText = context.Tree.GetText(context.CancellationToken);
CSharpVirtualCharService.cs (1)
186var parentSourceText = parentExpression.SyntaxTree.GetText();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
377var sourceText = token.SyntaxTree!.GetText(cancellationToken);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
CSharpIndentationService.cs (1)
147var text = node.SyntaxTree.GetText();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
22var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
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)
141var sourceText = token.SyntaxTree.GetText();
Microsoft.CodeAnalysis.CSharp.Emit.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 (13)
Completion\CompletionProviders\PartialMethodCompletionProvider.cs (2)
93var text = tree.GetText(cancellationToken); 117while (IsOnSameLine(token, touchingToken, tree.GetText(cancellationToken)))
ConsecutiveBracePlacementDiagnosticAnalyzer.cs (1)
50var text = tree.GetText(cancellationToken);
ConstructorInitializerPlacementDiagnosticAnalyzer.cs (1)
65var sourceText = context.Tree.GetText(context.CancellationToken);
Debugging\CSharpProximityExpressionsService.Worker.cs (2)
161var line = _syntaxTree.GetText(cancellationToken).Lines.IndexOf(_position); 166nextStatement != null && _syntaxTree.GetText(cancellationToken).Lines.IndexOf(nextStatement.SpanStart) == line;
DocumentationComments\CSharpDocumentationCommentSnippetService.cs (1)
233if (position >= syntaxTree.GetText(cancellationToken).Length)
EditAndContinue\BreakpointSpans.cs (1)
19var source = tree.GetText(cancellationToken);
LineSeparators\CSharpLineSeparatorService.cs (3)
333var line = syntaxTree.GetText(cancellationToken).Lines.IndexOf(textSpan.End); 334if (line == syntaxTree.GetText(cancellationToken).Lines.Count - 1) 339if (string.IsNullOrWhiteSpace(syntaxTree.GetText(cancellationToken).Lines[line + 1].ToString()))
Structure\Providers\DisabledTextTriviaStructureProvider.cs (1)
71var text = syntaxTree.GetText(cancellationToken);
Structure\Providers\IfDirectiveTriviaStructureProvider.cs (1)
40text ??= node.SyntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.CSharp.Scripting.UnitTests (2)
ScriptTests.cs (2)
64Assert.Equal(state.Script.Code, compilation.SyntaxTrees.First().GetText().ToString()); 72Assert.Equal(state.Script.SourceText, compilation.SyntaxTrees.First().GetText());
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (14)
Semantics\BindingAwaitTests.cs (1)
26SourceText text = tree.GetText();
Semantics\LocalFunctionTests.cs (12)
7262var localFuncPosition = tree.GetText().ToString().IndexOf("void local<TParameter>()", StringComparison.Ordinal) - 1; 7263var methodPosition = tree.GetText().ToString().IndexOf("void M2<TParameter>()", StringComparison.Ordinal) - 1; 7415var localFuncPosition = tree.GetText().ToString().IndexOf("[My(a)]", StringComparison.Ordinal); 7416var methodPosition = tree.GetText().ToString().IndexOf("[My(b)]", StringComparison.Ordinal); 7489var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 7490var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal); 8845var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 8846var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal); 9353var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 9354var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal); 9671var localFuncPosition = tree.GetText().ToString().IndexOf("positionA", StringComparison.Ordinal); 9672var methodPosition = tree.GetText().ToString().IndexOf("positionB", StringComparison.Ordinal);
Semantics\TopLevelStatementsTests.cs (1)
8783Assert.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)
452return _underlyingTree.GetText(cancellationToken);
Symbols\Metadata\MetadataTypeTests.cs (2)
362var oldIText = oldTree.GetText(); 377oldIText = oldTree.GetText();
Symbols\Source\DeclaringSyntaxNodeTests.cs (2)
138string code = tree.GetText().ToString(); 153string code = tree.GetText().ToString();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (53)
Diagnostics\DiagnosticTest.cs (1)
2374string 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 (32)
1365Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 1420Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 1507Assert.Equal(parsedTree.GetText().ToString(), incrementalTree.GetText().ToString()); 2524var oldIText = oldTree.GetText(); 2538oldIText = oldTree.GetText(); 2602var currIText = currTree.GetText(); 2642var currIText = currTree.GetText(); 2822var text = tree.GetText(); 2843var text = tree.GetText(); 2864var text = tree.GetText(); 2885var text = tree.GetText(); 2906var text = tree.GetText(); 2927var text = tree.GetText(); 2951var text = tree.GetText(); 2975var text = tree.GetText(); 2999var text = tree.GetText(); 3023var text = tree.GetText(); 3047var text = tree.GetText(); 3073var text = tree.GetText(); 3099var text = tree.GetText(); 3124var text = tree.GetText(); 3150var text = tree.GetText(); 3168var text = tree.GetText(); 3186var text = tree.GetText(); 3204var text = tree.GetText(); 3219var text = tree.GetText(); 3233var text = tree.GetText(); 3247var text = tree.GetText(); 3285var text = tree.GetText();
Parsing\ParserRegressionTests.cs (1)
163var lines1 = tree.GetText().Lines.Count; // 3
Syntax\SyntaxEquivalenceTests.cs (2)
20var tree3 = SyntaxFactory.ParseSyntaxTree(tree2.GetText().ToString()); 29var tree3 = SyntaxFactory.ParseSyntaxTree(tree2.GetText().ToString());
Syntax\SyntaxFactoryTests.cs (2)
33var text = SyntaxFactory.SyntaxTree(SyntaxFactory.CompilationUnit(), encoding: null).GetText(); 41var text = SyntaxFactory.CompilationUnit().SyntaxTree.GetText();
Syntax\SyntaxNodeTests.cs (3)
762var position = tree.GetText().Lines[2].End - 1; 884var tree2 = tree1.WithChangedText(tree1.GetText().WithChanges(new TextChange(default, " "))); 895var 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)
CSharpIndentationService.cs (1)
147var text = node.SyntaxTree.GetText();
CSharpVirtualCharService.cs (1)
186var parentSourceText = parentExpression.SyntaxTree.GetText();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
377var sourceText = token.SyntaxTree!.GetText(cancellationToken);
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\Extensions\SyntaxTokenExtensions.cs\SyntaxTokenExtensions.cs (1)
22var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Microsoft.CodeAnalysis.EditorFeatures (2)
DocumentationComments\AbstractDocumentationCommentCommandHandler.cs (1)
215var text = syntaxTree.GetText(c.UserCancellationToken);
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCommitter.cs (1)
184var fullText = syntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
Diagnostics\AbstractSuppressionAllCodeTests.cs (1)
117var newText = newTree.GetText().ToString();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
EditAndContinue\ActiveStatementsDescription.cs (1)
88var newText = newTree.GetText();
EditAndContinue\EditAndContinueTestHelpers.cs (1)
432var text = tree.GetText();
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (2)
76var actualText = tree.GetText().ToString(highlightSpans[j]); 82var expectedText = tree.GetText().ToString(expectedHighlightSpans[j]);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (1)
446Generate(syntaxTree.GetText().ToString(), fileName);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Rename\RenameEngineResult.vb (1)
230newText = newTree.GetText().ToString(newLocation)
Microsoft.CodeAnalysis.Features (4)
AbstractRemoveUnnecessaryParenthesesDiagnosticAnalyzer.cs (1)
132var lines = parenthesizedExpression.SyntaxTree.GetText(cancellationToken).Lines;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.cs (1)
275var lines = syntaxTree.GetText(cancellationToken).Lines;
FormattingAnalyzerHelper.cs (1)
23var oldText = tree.GetText(cancellationToken);
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
113var sourceText = semanticModel.SyntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.IncrementalMemberEditAnalyzer.cs (1)
259var text = tree.GetText(cancellationToken);
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (1)
Generator.cs (1)
266var sourceText = semanticModel.SyntaxTree.GetText(cancellationToken);
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator.UnitTests (1)
ProjectStructureTests.vb (1)
63Assert.Equal(tree.GetText().ToString(), contents)
Microsoft.CodeAnalysis.Rebuild (1)
CompilationFactory.cs (1)
85.Select(st => (path: st.FilePath, text: st.GetText()))
Microsoft.CodeAnalysis.Rebuild.UnitTests (4)
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());
RoundTripUtil.cs (1)
94original.SyntaxTrees.SelectAsArray(x => compilationFactory.CreateSyntaxTree(x.FilePath, x.GetText())),
Microsoft.CodeAnalysis.Test.Utilities (5)
Compilation\IRuntimeEnvironment.cs (1)
252.Select(t => (filePath: t.FilePath, text: t.GetText()))
CompilationVerifier.cs (1)
612ILValidation.GetSequencePointMarkers(xmlMethod, id => _compilation.SyntaxTrees.Single(tree => tree.FilePath == documentMap[id]).GetText()) :
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1716context.TryGetValue(treeContext.Tree.GetText(), _textValueProvider, out var length);
Diagnostics\DiagnosticDescription.cs (2)
160_squiggledText = _location.SourceTree.GetText().ToString(_location.SourceSpan); 544assertText.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)
SyntaxTokenExtensions.vb (1)
202Dim text = token.SyntaxTree.GetText()
SyntaxTreeExtensions.vb (2)
358Dim line = syntaxTree.GetText(cancellationToken).Lines(lineNumber) 363syntaxTree.GetText(cancellationToken).Lines.IndexOf(statement.SpanStart) = lineNumber Then
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
SpecialFormattingOperation.vb (1)
124Dim sourceText = node.SyntaxTree.GetText()
VisualBasicIndentationService.Indenter.vb (1)
116If HasLinesBetween(indenter.Tree.GetText().Lines.IndexOf(token.Span.End), indenter.LineToBeIndented.LineNumber) Then
Microsoft.CodeAnalysis.VisualBasic.Emit.UnitTests (4)
CodeGen\CodeGenTuples.vb (1)
6716For i As Integer = 0 To tree.GetText().Length
PDB\PDBEmbeddedSourceTests.vb (3)
38EmbeddedText.FromSource(tree1.FilePath, tree1.GetText()), 39EmbeddedText.FromSource(tree2.FilePath, tree2.GetText()) 91embeddedTexts:={EmbeddedText.FromSource(tree.FilePath, tree.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)
26Dim line = syntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(span.Start)
Microsoft.CodeAnalysis.VisualBasic.Scripting.UnitTests (1)
ScriptTests.vb (1)
62Assert.Equal(script.Code, compilation.SyntaxTrees.First().GetText().ToString())
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (16)
Binding\BindingScopeTests.vb (1)
18Dim treeText As String = tree.GetText().ToString()
Compilation\GetSemanticInfoBrokenCodeTests.vb (2)
108Dim oldText = oldTree.GetText() 138Dim oldText = oldTree.GetText()
Compilation\MyTemplateTests.vb (3)
51Dim sourceText = MyTemplate.GetText() 75Dim text = MyTemplate.GetText.ToString 98Dim text = MyTemplate.GetText.ToString
DeclaringSyntaxNodeTests.vb (6)
104Dim code As String = tree.GetText().ToString() 118Dim code As String = tree.GetText().ToString() 129Dim code As String = tree.GetText().ToString() 230Dim text = tree.GetText().ToString() 265Dim text = tree.GetText().ToString() 306Dim text = tree.GetText().ToString()
Diagnostics\GetDiagnosticsTests.vb (3)
33Dim sourceText = compilation.SyntaxTrees.Single().GetText().ToString() 64Dim sourceText = compilation.SyntaxTrees.Single().GetText().ToString() 82Dim sourceText = compilation.SyntaxTrees.Single().GetText().ToString()
Semantics\GetUnusedImportDirectivesTests.vb (1)
56Dim position = tree.GetText().ToString().IndexOf("' Comment", StringComparison.Ordinal)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (17)
DocumentationComments\DocCommentTests.vb (1)
12084Dim text As String = tree.GetText().ToString()
SymbolDisplay\SymbolDisplayTests.vb (1)
6003Dim newTree = tree.WithChangedText(tree.GetText())
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 (21)
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 (3)
3387Dim index = tree.GetText.ToString.IndexOf(text, 0, StringComparison.Ordinal) 3462Dim endPos = tree.GetText.ToString.Length 3522Dim endPos = tree.GetText.ToString.Length
Syntax\SyntaxEquivalenceTests.vb (2)
16Dim tree3 = VisualBasicSyntaxTree.ParseText(tree2.GetText().ToString()) 23Dim 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)
646Dim text As String = tree.GetText().ToString() 654Dim text As String = tree.GetText().ToString() 996Dim lineText As String = GetLineText(sourceLocation.SourceTree.GetText(), sourceLocation.SourceSpan.Start, offsetInLine) 1118Dim 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 (6)
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTokenExtensions.vb\SyntaxTokenExtensions.vb (1)
202Dim text = token.SyntaxTree.GetText()
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\VisualBasic\Extensions\SyntaxTreeExtensions.vb\SyntaxTreeExtensions.vb (2)
358Dim line = syntaxTree.GetText(cancellationToken).Lines(lineNumber) 363syntaxTree.GetText(cancellationToken).Lines.IndexOf(statement.SpanStart) = lineNumber Then
Simplification\Reducers\VisualBasicEscapingReducer.vb (1)
153Dim text = parent.SyntaxTree.GetText(cancellationToken)
SpecialFormattingOperation.vb (1)
124Dim sourceText = node.SyntaxTree.GetText()
VisualBasicIndentationService.Indenter.vb (1)
116If HasLinesBetween(indenter.Tree.GetText().Lines.IndexOf(token.Span.End), indenter.LineToBeIndented.LineNumber) Then
Microsoft.CodeAnalysis.Workspaces (16)
AbstractDocumentationCommentService.cs (1)
86var line = syntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(spanStart);
AbstractIndentation.Indenter.cs (1)
54Text = tree.GetText(cancellationToken);
AddParameterEditor.cs (2)
25var sourceText = declaration.SyntaxTree.GetText(cancellationToken); 159var text = parameters[0].SyntaxTree.GetText(cancellationToken);
BottomUpBaseIndentationFinder.cs (1)
166var textLine = baseToken.SyntaxTree.GetText(cancellationToken).Lines.GetLineFromPosition(baseToken.SpanStart);
CommonFormattingHelpers.cs (1)
148var line = tree.GetText().Lines.GetLineFromPosition(startPosition);
J\s\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
23var text = tree.GetText();
J\s\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (2)
25var text = tree.GetText(cancellationToken); 102var text = tree.GetText(cancellationToken);
ParsedDocument.cs (1)
58var text = root.SyntaxTree.GetText(cancellationToken);
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();
Workspace\Solution\DocumentState.cs (2)
229var oldText = oldTree.GetText(cancellationToken); 550tree.GetText,
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (2)
VisualStudioMSBuildWorkspaceTests.cs (2)
2854Assert.Null(doc2tree.GetText().Encoding); 2867Assert.Equal(doc3text.Encoding, doc3tree.GetText().Encoding);
Microsoft.CodeAnalysis.Workspaces.UnitTests (17)
FindReferencesTests.cs (3)
158.AddDocument(docId, "testFile", tree.GetText()); 197.AddDocument(docId, "testFile", tree.GetText()); 261.AddDocument(docId, "testFile", tree.GetText());
SolutionTests\SolutionTests.cs (9)
281Assert.Equal(SourceHashAlgorithm.Sha1, tree.GetText().ChecksumAlgorithm); 1149Assert.Equal(expectedAlgorithm, (await document.GetRequiredSyntaxTreeAsync(default)).GetText().ChecksumAlgorithm); 1150Assert.Equal(expectedAlgorithm, document.GetRequiredSyntaxTreeSynchronously(default).GetText().ChecksumAlgorithm); 1160Assert.Equal(expectedAlgorithm, tree.GetText(default).ChecksumAlgorithm); 1837Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm); 1866Assert.Equal(SourceHashAlgorithm.Sha1, root.SyntaxTree.GetText().ChecksumAlgorithm); 2553var text2 = tree2.GetText(); 3802var sourceText = strongTree.GetText(); 4318var treeText = newDocTree.GetText();
SolutionTests\SolutionWithSourceGeneratorTests.cs (2)
267Assert.Equal(expectedGeneratedContents, generatedSyntaxTree.GetText().ToString()); 317var texts = compilation.SyntaxTrees.Select(t => t.GetText().ToString());
SymbolKeyTests.cs (1)
1345var 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)
51var start = location.SourceTree.GetText().Lines[lineSpan.StartLinePosition.Line].Start; 52var end = location.SourceTree.GetText().Lines[lineSpan.EndLinePosition.Line].End; 53return 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)
331var text = tree.GetText();
Microsoft.VisualStudio.LanguageServices.CSharp (3)
CodeModel\CSharpCodeModelService.cs (3)
1277var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None); 1357var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None); 1415var text = memberDeclaration.SyntaxTree.GetText(CancellationToken.None);
Microsoft.VisualStudio.LanguageServices.Implementation (3)
CodeModel\AbstractCodeModelService.AbstractNodeLocator.cs (2)
30var text = node.SyntaxTree.GetText(); 36var text = node.SyntaxTree.GetText();
CodeModel\MethodXml\AbstractMethodXmlBuilder.cs (1)
73this.Text = semanticModel.SyntaxTree.GetText();
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)