5 overrides of ToString
Microsoft.CodeAnalysis (4)
Text\ChangedText.cs (1)
137public override string ToString(TextSpan span)
Text\StringBuilderText.cs (1)
78public override string ToString(TextSpan span)
Text\StringText.cs (1)
71public override string ToString(TextSpan span)
Text\SubText.cs (1)
71public override string ToString(TextSpan span)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
178public override string ToString(TextSpan textSpan)
87 references to ToString
Microsoft.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
291=> new("Text", text.ToString(span));
Microsoft.CodeAnalysis (6)
Syntax\SyntaxTreeExtensions.cs (1)
55var fromText = text.ToString(textSpanOpt.Value);
Text\ChangedText.cs (1)
139return _newText.ToString(span);
Text\SourceText.cs (2)
710return ToString(new TextSpan(0, this.Length)); 915newt = this.ToString(span);
Text\SubText.cs (1)
75return UnderlyingText.ToString(GetCompositeSpan(span.Start, span.Length));
Text\TextLine.cs (1)
179return _text.ToString(this.Span);
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
55var fromText = text.ToString(textSpanOpt.Value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
38return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 44return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 47return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
158=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
40return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.CSharp (1)
Parser\Lexer.cs (1)
736info.Text = TextWindow.Text.ToString(TextSpan.FromBounds(startingPosition, end));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
239var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
209var endingString = text.ToString(TextSpan.FromBounds(lastToken.Span.End, line.End));
StringCopyPaste\KnownSourcePasteProcessor.cs (1)
297builder.Append(sourceText.ToString(sourceText.Lines[i].SpanIncludingLineBreak));
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
252return textBeforePaste.ToString(TextSpan.FromBounds(lastLine.Span.Start, quotePosition));
StringCopyPaste\StringCopyPasteHelpers.cs (1)
525return text.ToString(lineWhitespaceSpan);
StringCopyPaste\UnknownSourcePasteProcessor.cs (2)
186var fullChangeLineText = textOfCurrentChange.ToString(currentChangeLine.SpanIncludingLineBreak); 255var fullChangeLineText = textOfCurrentChange.ToString(currentChangeLine.SpanIncludingLineBreak);
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
226=> new("Text", text.ToString(span));
Microsoft.CodeAnalysis.CSharp.Features (7)
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (6)
316builder.Append(text.ToString(TextSpan.FromBounds(line.End, line.EndIncludingLineBreak))); 336builder.Append(text.ToString(TextSpan.FromBounds(firstNonWhitespacePos, line.EndIncludingLineBreak))); 482=> builder.Append(line.Text!.ToString(line.SpanIncludingLineBreak)); 581builder.Append(text.ToString(TextSpan.FromBounds(line.End, line.EndIncludingLineBreak))); 596builder.Append(text.ToString(TextSpan.FromBounds(line.Start + commonWhitespacePrefix.Length, line.EndIncludingLineBreak))); 614builder.Append(text.ToString(TextSpan.FromBounds(line.Start + commonWhitespacePrefix.Length, line.EndIncludingLineBreak)));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
850: EndOfLine(text.ToString(lineBreakSpan));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\ClassificationHelpers.cs (2)
500var text2 = text.ToString(textSpan); 525var text = rawText.ToString(span);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
239var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Microsoft.CodeAnalysis.EditorFeatures (3)
AutomaticCompletion\AbstractAutomaticLineEnderCommandHandler.cs (1)
177if (string.IsNullOrWhiteSpace(text.ToString(TextSpan.FromBounds(token.Span.End, line.End))))
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (2)
215return sourceText.ToString(span); 422if (documentNewText.ToString(replacements[i].NewSpan) != firstDocumentNewSpanText[i])
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
Completion\AbstractCompletionProviderTests.cs (2)
1290var assertText = "'" + text.ToString(new TextSpan(position, 1)) + "' expected to be textual trigger character"; 1295var assertText = "'" + text.ToString(new TextSpan(position, 1)) + "' expected to NOT be textual trigger character";
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (2)
75var actualText = tree.GetText().ToString(highlightSpans[j]); 81var expectedText = tree.GetText().ToString(expectedHighlightSpans[j]);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (1)
Classification\ClassificationTests.vb (1)
240Dim subText = text.ToString(span.TextSpan)
Microsoft.CodeAnalysis.Features (6)
Completion\Utilities.cs (1)
42return new TextChange(totalOldSpan, newText.ToString(totalNewSpan));
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
723lineText = text.ToString(TextSpan.FromBounds(diagnostic.Span.Start, Math.Min(diagnostic.Span.Start + 120, line.End)));
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (1)
113var text = sourceText.ToString(replacementSpan);
TaskList\AbstractTaskListService.cs (2)
145var startMessage = text.ToString(TextSpan.FromBounds(fullSpan.Start, startLine.End)); 160var endMessage = text.ToString(new TextSpan(endLine.Start, length));
Wrapping\AbstractCodeActionComputer.cs (1)
180var text = OriginalSourceText.ToString(span);
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\Extensions.cs (1)
31d.Span == default ? null : newSource.ToString(d.Span),
Snippets\AbstractSnippetProviderTests.cs (1)
103Assert.Equal(documentTextAfterSnippet.ToString(expectedSpan), placeholderText);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\References\FindUsagesLSPContext.cs (1)
358span.ClassificationType, docText.ToString(span.TextSpan), ClassifiedTextRunStyle.Plain, markerTagType));
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticDescription.cs (1)
161_squiggledText = _location.SourceTree.GetText().ToString(_location.SourceSpan);
Microsoft.CodeAnalysis.UnitTests (7)
Text\CompositeTextTests.cs (1)
50return textLines.Select(l => l.Text!.ToString(l.SpanIncludingLineBreak));
Text\SourceTextTests.cs (1)
192var change = new TextChange(span, text.ToString(span));
Text\StringTextTests_Default.cs (5)
73Assert.Equal("goo", data.ToString(data.Lines[0].Span)); 74Assert.Equal("bar", data.ToString(data.Lines[1].Span)); 75Assert.Equal("baz", data.ToString(data.Lines[2].Span)); 83Assert.Equal("goo", data.ToString(data.Lines[0].Span)); 84Assert.Equal("bar", data.ToString(data.Lines[1].Span));
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (15)
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 (1)
IncrementalParser\IncrementalParser.vb (1)
91text = text.WithChanges(New TextChange(span, text.ToString(span)))
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Classification\ClassificationHelpers.vb (1)
323Dim text2 = text.ToString(textSpan)
Microsoft.CodeAnalysis.Workspaces (7)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
55var fromText = text.ToString(textSpanOpt.Value);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
38return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 44return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 47return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
158=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
40return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.VisualStudio.LanguageServices (3)
Implementation\AbstractEditorFactory.cs (1)
361var originalNewLine = originalText.ToString(CodeAnalysis.Text.TextSpan.FromBounds(originalLine.End, originalLine.EndIncludingLineBreak));
ValueTracking\TreeItemViewModel.cs (1)
42public override string AutomationName => _sourceText.ToString(TextSpan);
Venus\ContainedDocument.cs (1)
352var leftText = originalText.ToString(changeInOriginalText.Span);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
140var textAfterBrace = text.ToString(TextSpan.FromBounds(openBrace.Span.End, openBraceLine.End)); 214var textBeforeBrace = text.ToString(TextSpan.FromBounds(closeBraceLine.Start, closeBrace.SpanStart));