5 overrides of ToString
Microsoft.CodeAnalysis (4)
Text\ChangedText.cs (1)
138public 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)
66public override string ToString(TextSpan span)
Microsoft.CodeAnalysis.EditorFeatures.Text (1)
Extensions.SnapshotSourceText.cs (1)
179public override string ToString(TextSpan textSpan)
95 references to ToString
Microsoft.CodeAnalysis (6)
Syntax\SyntaxTreeExtensions.cs (1)
55var fromText = text.ToString(textSpanOpt.Value);
Text\ChangedText.cs (1)
140return _newText.ToString(span);
Text\SourceText.cs (2)
603return ToString(new TextSpan(0, this.Length)); 805newt = this.ToString(span);
Text\SubText.cs (1)
70return UnderlyingText.ToString(GetCompositeSpan(span.Start, span.Length));
Text\TextLine.cs (1)
167return _text.ToString(this.Span);
Microsoft.CodeAnalysis.CodeStyle (6)
CommonFormattingHelpers.cs (2)
154=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
J\s\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
55var fromText = text.ToString(textSpanOpt.Value);
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));
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
IIndentationService.cs (1)
40return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.CSharp (1)
Parser\Lexer.cs (1)
920info.Text = TextWindow.Text.ToString(new TextSpan(startingPosition, width));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
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 (8)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
218var endingString = text.ToString(TextSpan.FromBounds(lastToken.Span.End, line.End));
StringCopyPaste\KnownSourcePasteProcessor.cs (2)
309builder.Append(sourceText.ToString(sourceText.Lines[i].SpanIncludingLineBreak)); 354builder.Append(TextBeforePaste.ToString(new TextSpan(TextBeforePaste.Lines[line].Start, offset)));
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
263return textBeforePaste.ToString(TextSpan.FromBounds(lastLine.Span.Start, quotePosition));
StringCopyPaste\StringCopyPasteHelpers.cs (1)
528return text.ToString(lineWhitespaceSpan);
StringCopyPaste\UnknownSourcePasteProcessor.cs (3)
194var fullChangeLineText = textOfCurrentChange.ToString(currentChangeLine.SpanIncludingLineBreak); 263var fullChangeLineText = textOfCurrentChange.ToString(currentChangeLine.SpanIncludingLineBreak); 334buffer.Append(TextBeforePaste.ToString(new TextSpan(TextBeforePaste.Lines[line].Start, offset)));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
227=> new("Text", text.ToString(span));
Microsoft.CodeAnalysis.CSharp.Features (4)
BraceMatching\BlockCommentBraceMatcher.cs (2)
40if (text.ToString(startBrace) == "/**" && text.ToString(endBrace) == "*/")
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
142var replacement = item.DisplayText + text.ToString(TextSpan.FromBounds(expressionStart, dotLikeToken.SpanStart));
SplitStringLiteral\InterpolatedStringSplitter.cs (1)
87var content = Document.Text.ToString(TextSpan.FromBounds(start, end));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\ClassificationHelpers.cs (2)
502var text2 = text.ToString(textSpan); 527var text = rawText.ToString(span);
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 (4)
AutomaticCompletion\AbstractAutomaticLineEnderCommandHandler.cs (1)
176if (string.IsNullOrWhiteSpace(text.ToString(TextSpan.FromBounds(token.Span.End, line.End))))
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (3)
216return sourceText.ToString(span); 411var firstDocumentNewSpanText = firstDocumentReplacements.Item2.SelectAsArray(replacement => firstDocumentNewText.ToString(replacement.NewSpan)); 422if (documentNewText.ToString(replacements[i].NewSpan) != firstDocumentNewSpanText[i])
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Completion\AbstractCompletionProviderTests.cs (2)
1064var assertText = "'" + text.ToString(new TextSpan(position, 1)) + "' expected to be textual trigger character"; 1069var assertText = "'" + text.ToString(new TextSpan(position, 1)) + "' expected to NOT be textual trigger character";
EditAndContinue\Extensions.cs (1)
21d.Span == default ? null : newSource.ToString(d.Span),
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (2)
76var actualText = tree.GetText().ToString(highlightSpans[j]); 82var expectedText = tree.GetText().ToString(expectedHighlightSpans[j]);
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
Classification\ClassificationTests.vb (1)
239Dim subText = text.ToString(span.TextSpan)
Classification\SyntacticChangeRangeComputerTests.vb (1)
40Assert.True(expectedChange = actualChange, expectedChange.ToString() & " != " & actualChange.ToString() & vbCrLf & "Changed span was" & vbCrLf & startingText.ToString(actualChange.Span))
Rename\RenameEngineResult.vb (2)
230newText = newTree.GetText().ToString(newLocation) 269Let spanText = document.GetTextSynchronously(CancellationToken.None).ToString(location.ConflictCheckSpan)
Microsoft.CodeAnalysis.Features (10)
Completion\Utilities.cs (1)
42return new TextChange(totalOldSpan, newText.ToString(totalNewSpan));
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
710lineText = text.ToString(TextSpan.FromBounds(diagnostic.Span.Start, Math.Min(diagnostic.Span.Start + 120, line.End)));
Rename\SymbolicRenameInfo.cs (1)
257var triggerText = sourceText.ToString(triggerToken.Span);
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (3)
43var singleWordText = sourceText.ToString(singleWordSpan); 67var fullyQualifiedText = sourceText.ToString(fullyQualifiedSpan); 114var text = sourceText.ToString(replacementSpan);
Snippets\RoslynLSPSnippetConverter.cs (1)
115var newString = documentText.ToString(extendedSpan);
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)
181var text = OriginalSourceText.ToString(span);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\References\FindUsagesLSPContext.cs (1)
317span.ClassificationType, docText.ToString(span.TextSpan), ClassifiedTextRunStyle.Plain, markerTagType));
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\DiagnosticDescription.cs (1)
160_squiggledText = _location.SourceTree.GetText().ToString(_location.SourceSpan);
Microsoft.CodeAnalysis.UnitTests (6)
Text\SourceTextTests.cs (1)
182var 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.EditorFeatures (1)
AutomaticCompletion\AutomaticLineEnderCommandHandler.vb (1)
90Dim endingString = text.ToString(TextSpan.FromBounds(nonMissingToken.Span.End, line.End))
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)
322Dim text2 = text.ToString(textSpan)
Microsoft.CodeAnalysis.Workspaces (8)
Classification\Classifier.cs (1)
118parts.Add(new SymbolDisplayPart(kind.Value, null, sourceText.ToString(span.TextSpan)));
CommonFormattingHelpers.cs (2)
154=> (token1.RawKind == 0) ? text.ToString(TextSpan.FromBounds(0, token2.SpanStart)) : text.ToString(TextSpan.FromBounds(token1.Span.End, token2.SpanStart));
IIndentationService.cs (1)
40return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
J\s\src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs\SyntaxTreeExtensions.cs (1)
55var fromText = text.ToString(textSpanOpt.Value);
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));
Microsoft.VisualStudio.LanguageServices (5)
FindReferences\Entries\DocumentSpanEntry.cs (1)
167cs => new ClassifiedText(cs.ClassificationType, _excerptResult.Content.ToString(cs.TextSpan)));
Implementation\AbstractEditorFactory.cs (1)
362var originalNewLine = originalText.ToString(CodeAnalysis.Text.TextSpan.FromBounds(originalLine.End, originalLine.EndIncludingLineBreak));
ValueTracking\TreeItemViewModel.cs (2)
42public override string AutomationName => _sourceText.ToString(TextSpan); 112return new ClassifiedText(cs.ClassificationType, _sourceText.ToString(cs.TextSpan));
Venus\ContainedDocument.cs (1)
355var leftText = originalText.ToString(changeInOriginalText.Span);
Microsoft.VisualStudio.LanguageServices.CSharp (2)
CodeModel\CSharpCodeModelService.NodeLocator.cs (2)
141var textAfterBrace = text.ToString(TextSpan.FromBounds(openBrace.Span.End, openBraceLine.End)); 215var textBeforeBrace = text.ToString(TextSpan.FromBounds(closeBraceLine.Start, closeBrace.SpanStart));