4 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)
103 references to ToString
dotnet (1)
Commands\Run\FileBasedAppSourceEditor.cs (1)
65? text.ToString(line.SpanIncludingLineBreak)
dotnet-format (1)
Formatters\EndOfLineFormatter.cs (1)
48var lineEnding = newSourceText.ToString(lineEndingSpan);
GenerateDocumentationAndConfigFiles (7)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
37return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 43return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 46return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
157=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis (6)
Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
Text\ChangedText.cs (1)
139return _newText.ToString(span);
Text\SourceText.cs (2)
714return ToString(new TextSpan(0, this.Length)); 934newt = this.ToString(span);
Text\SubText.cs (1)
75return UnderlyingText.ToString(GetCompositeSpan(span.Start, span.Length));
Text\TextLine.cs (1)
181return _text.ToString(this.Span);
Microsoft.CodeAnalysis.Analyzers (7)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
37return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 43return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 46return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
157=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
37return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 43return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 46return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
157=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
Microsoft.CodeAnalysis.CodeStyle (6)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
37return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 43return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 46return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
157=> (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\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.CSharp (2)
Parser\Lexer.cs (1)
720info.Text = TextWindow.Text.ToString(TextSpan.FromBounds(startingPosition, end));
Parser\SlidingTextWindow.cs (1)
418return this.Text.ToString(span);
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
247var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
915: EndOfLine(text.ToString(lineBreakSpan));
Microsoft.CodeAnalysis.CSharp.Features (14)
BraceMatching\BlockCommentBraceMatcher.cs (2)
56if (text.ToString(startBrace) == "/**" && text.ToString(endBrace) == "*/")
Completion\CompletionProviders\DeclarationName\DeclarationNameInfo.cs (1)
192var type = SyntaxFactory.ParseTypeName(sourceText.ToString(subSpan));
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
143var replacement = item.DisplayText + text.ToString(TextSpan.FromBounds(expressionStart, dotLikeToken.SpanStart));
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (8)
314builder.Append(text.ToString(TextSpan.FromBounds(line.End, line.EndIncludingLineBreak))); 334builder.Append(text.ToString(TextSpan.FromBounds(firstNonWhitespacePos, line.EndIncludingLineBreak))); 480=> builder.Append(line.Text!.ToString(line.SpanIncludingLineBreak)); 579builder.Append(text.ToString(TextSpan.FromBounds(line.End, line.EndIncludingLineBreak))); 591var currentLineLeadingWhitespace = line.Text!.ToString(TextSpan.FromBounds(line.Start, pos)); 594builder.Append(text.ToString(TextSpan.FromBounds(line.Start + commonWhitespacePrefix.Length, line.EndIncludingLineBreak))); 612builder.Append(text.ToString(TextSpan.FromBounds(line.Start + commonWhitespacePrefix.Length, line.EndIncludingLineBreak))); 666var currentLineLeadingWhitespace = line.Text!.ToString(TextSpan.FromBounds(line.Start, pos));
SplitStringLiteral\InterpolatedStringSplitter.cs (1)
83var content = Document.Text.ToString(TextSpan.FromBounds(start, end));
src\roslyn\src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
915: EndOfLine(text.ToString(lineBreakSpan));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\ClassificationHelpers.cs (2)
509var text2 = text.ToString(textSpan); 534var text = rawText.ToString(span);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
247var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Microsoft.CodeAnalysis.Features (17)
Completion\Utilities.cs (1)
42return new TextChange(totalOldSpan, newText.ToString(totalNewSpan));
Copilot\IProposalAdjusterService.cs (3)
311var protectedText = originalText.ToString(protectedSpan); 331var overlapText = originalText.ToString(TextSpan.FromBounds(protectedSpan.Start, change.Span.End)); 341var overlapText = originalText.ToString(TextSpan.FromBounds(change.Span.Start, protectedSpan.End));
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
719lineText = text.ToString(TextSpan.FromBounds(diagnostic.Span.Start, Math.Min(diagnostic.Span.Start + 120, line.End)));
InvertIf\AbstractInvertIfCodeRefactoringProvider.cs (2)
184new TextChange(trueSpan, text.ToString(falseSpan)), 185new TextChange(falseSpan, text.ToString(trueSpan)));
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
159text.ToString(span.TextSpan),
Rename\SymbolicRenameInfo.cs (1)
255var triggerText = sourceText.ToString(triggerToken.Span);
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (3)
48var singleWordText = sourceText.ToString(singleWordSpan); 72var fullyQualifiedText = sourceText.ToString(fullyQualifiedSpan); 119var text = sourceText.ToString(replacementSpan);
SemanticSearch\SemanticSearchDefinitionItemFactory.cs (1)
67var displayText = new TaggedText(TextTags.Text, text.ToString(displaySpan));
Snippets\RoslynLSPSnippetConverter.cs (1)
112var newString = documentText.ToString(extendedSpan);
TaskList\AbstractTaskListService.cs (2)
143var startMessage = text.ToString(TextSpan.FromBounds(fullSpan.Start, startLine.End)); 158var endMessage = text.ToString(new TextSpan(endLine.Start, length));
Wrapping\AbstractCodeActionComputer.cs (1)
181var text = OriginalSourceText.ToString(span);
Microsoft.CodeAnalysis.Razor.Compiler (6)
Language\DefaultTagHelperResolutionPhase.cs (2)
842var exprText = sourceDocument.Text.ToString( 891var innerText = sourceDocument.Text.ToString(
Language\DefaultTagHelperResolutionPhase.LegacyTagHelperResolver.cs (4)
592var sourceText = sourceDocument.Text.ToString( 728var rawText = sourceDocument.Text.ToString( 1332var text = sourceDocument.Text.ToString( 1415var text = sourceDocument.Text.ToString(new Microsoft.CodeAnalysis.Text.TextSpan(vss.AbsoluteIndex, vss.Length));
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
37return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 43return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 46return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
157=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
Microsoft.CodeAnalysis.VisualBasic.Workspaces (1)
Classification\ClassificationHelpers.vb (1)
322Dim text2 = text.ToString(textSpan)
Microsoft.CodeAnalysis.Workspaces (8)
Classification\Classifier.cs (1)
139parts.Add(new SymbolDisplayPart(kind.Value, null, sourceText.ToString(span.TextSpan)));
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
37return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 43return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 46return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
157=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Roslyn.Diagnostics.Analyzers (7)
src\roslyn\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Formatting\Engine\TreeData.NodeAndText.cs (3)
37return _text.ToString(TextSpan.FromBounds(token2.FullSpan.Start, token2.SpanStart)); 43return _text.ToString(TextSpan.FromBounds(token1.Span.End, token1.FullSpan.End)); 46return _text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\CommonFormattingHelpers.cs (2)
157=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
247var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
SuperFileCheck (1)
Program.cs (1)
347var lineStr = text.ToString(line.Span);