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)
177public override string ToString(TextSpan textSpan)
184 references to ToString
GenerateDocumentationAndConfigFiles (7)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Metrics (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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));
Metrics.Legacy (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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.AspNetCore.App.Analyzers.Test (1)
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
291=> new("Text", text.ToString(span));
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)
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.Analyzers (7)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.AnalyzerUtilities (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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.BannedApiAnalyzers (7)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.CodeStyle (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.CSharp (1)
Parser\Lexer.cs (1)
735info.Text = TextWindow.Text.ToString(TextSpan.FromBounds(startingPosition, end));
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
238var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
846: EndOfLine(text.ToString(lineBreakSpan));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (8)
AutomaticCompletion\AutomaticLineEnderCommandHandler.cs (1)
209var endingString = text.ToString(TextSpan.FromBounds(lastToken.Span.End, line.End));
StringCopyPaste\KnownSourcePasteProcessor.cs (2)
296builder.Append(sourceText.ToString(sourceText.Lines[i].SpanIncludingLineBreak)); 341builder.Append(TextBeforePaste.ToString(new TextSpan(TextBeforePaste.Lines[line].Start, offset)));
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
247return textBeforePaste.ToString(TextSpan.FromBounds(lastLine.Span.Start, quotePosition));
StringCopyPaste\StringCopyPasteHelpers.cs (1)
524return text.ToString(lineWhitespaceSpan);
StringCopyPaste\UnknownSourcePasteProcessor.cs (3)
186var fullChangeLineText = textOfCurrentChange.ToString(currentChangeLine.SpanIncludingLineBreak); 255var fullChangeLineText = textOfCurrentChange.ToString(currentChangeLine.SpanIncludingLineBreak); 326buffer.Append(TextBeforePaste.ToString(new TextSpan(TextBeforePaste.Lines[line].Start, offset)));
Microsoft.CodeAnalysis.CSharp.EditorFeatures2.UnitTests (1)
EmbeddedLanguages\RegularExpressions\CSharpRegexParserTests.cs (1)
205=> new("Text", text.ToString(span));
Microsoft.CodeAnalysis.CSharp.Features (13)
BraceMatching\BlockCommentBraceMatcher.cs (2)
56if (text.ToString(startBrace) == "/**" && text.ToString(endBrace) == "*/")
Completion\CompletionProviders\OperatorsAndIndexer\UnnamedSymbolCompletionProvider_Operators.cs (1)
143var replacement = item.DisplayText + text.ToString(TextSpan.FromBounds(expressionStart, dotLikeToken.SpanStart));
ConvertToRawString\ConvertInterpolatedStringToRawStringCodeRefactoringProvider.cs (8)
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))); 593var currentLineLeadingWhitespace = line.Text!.ToString(TextSpan.FromBounds(line.Start, pos)); 596builder.Append(text.ToString(TextSpan.FromBounds(line.Start + commonWhitespacePrefix.Length, line.EndIncludingLineBreak))); 614builder.Append(text.ToString(TextSpan.FromBounds(line.Start + commonWhitespacePrefix.Length, line.EndIncludingLineBreak))); 668var currentLineLeadingWhitespace = line.Text!.ToString(TextSpan.FromBounds(line.Start, pos));
SplitStringLiteral\InterpolatedStringSplitter.cs (1)
83var content = Document.Text.ToString(TextSpan.FromBounds(start, end));
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpCollectionExpressionRewriter.cs (1)
846: EndOfLine(text.ToString(lineBreakSpan));
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\ClassificationHelpers.cs (2)
503var text2 = text.ToString(textSpan); 528var text = rawText.ToString(span);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
238var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Microsoft.CodeAnalysis.EditorFeatures (4)
AutomaticCompletion\AbstractAutomaticLineEnderCommandHandler.cs (1)
177if (string.IsNullOrWhiteSpace(text.ToString(TextSpan.FromBounds(token.Span.End, line.End))))
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (3)
215return 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 (4)
Completion\AbstractCompletionProviderTests.cs (2)
1279var assertText = "'" + text.ToString(new TextSpan(position, 1)) + "' expected to be textual trigger character"; 1284var 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)
239Dim subText = text.ToString(span.TextSpan)
Microsoft.CodeAnalysis.Features (11)
Completion\Utilities.cs (1)
42return new TextChange(totalOldSpan, newText.ToString(totalNewSpan));
EditAndContinue\AbstractEditAndContinueAnalyzer.cs (1)
711lineText = text.ToString(TextSpan.FromBounds(diagnostic.Span.Start, Math.Min(diagnostic.Span.Start + 120, line.End)));
QuickInfo\Presentation\QuickInfoContentBuilder.cs (1)
159text.ToString(span.TextSpan),
Rename\SymbolicRenameInfo.cs (1)
258var triggerText = sourceText.ToString(triggerToken.Span);
ReplaceDocCommentTextWithTag\AbstractReplaceDocCommentTextWithTagCodeRefactoringProvider.cs (3)
48var singleWordText = sourceText.ToString(singleWordSpan); 72var fullyQualifiedText = sourceText.ToString(fullyQualifiedSpan); 119var text = sourceText.ToString(replacementSpan);
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.Features.Test.Utilities (2)
EditAndContinue\Extensions.cs (1)
32d.Span == default ? null : newSource.ToString(d.Span),
Snippets\AbstractSnippetProviderTests.cs (1)
112Assert.Equal(documentTextAfterSnippet.ToString(expectedSpan), placeholderText);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\References\FindUsagesLSPContext.cs (1)
365span.ClassificationType, docText.ToString(span.TextSpan), ClassifiedTextRunStyle.Plain, markerTagType));
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (7)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.CodeAnalysis.PublicApiAnalyzers (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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.PublicApiAnalyzers.CodeFixes (1)
PublicApiFixHelpers.cs (1)
90return sourceText.ToString(new TextSpan(firstLine.End, firstLine.EndIncludingLineBreak - firstLine.End));
Microsoft.CodeAnalysis.ResxSourceGenerator (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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.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)
336Assert.Equal("C", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 338Assert.Equal("C", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 345Assert.Equal("D", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 347Assert.Equal("D", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 354Assert.Equal("T", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 356Assert.Equal("T", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 362Assert.Equal("m1", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 368Assert.Equal("x", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 374Assert.Equal("v1$", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 381Assert.Equal("N1", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 383Assert.Equal("N1", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 390Assert.Equal("N2", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 392Assert.Equal("N2", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 399Assert.Equal("N3", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 401Assert.Equal("N3", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan))
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
IncrementalParser\IncrementalParser.vb (1)
88text = 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)
139parts.Add(new SymbolDisplayPart(kind.Value, null, sourceText.ToString(span.TextSpan)));
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Microsoft.VisualStudio.LanguageServices (4)
Implementation\AbstractEditorFactory.cs (1)
357var 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)
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));
Roslyn.Diagnostics.Analyzers (7)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));
Roslyn.Diagnostics.CSharp.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SyntaxTokenExtensions.cs (1)
238var name = SyntaxFactory.ParseName(syntaxTree.GetText(cancellationToken).ToString(TextSpan.FromBounds(genericIdentifier.SpanStart, lastToken.Span.End)));
Test.Utilities (6)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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));
Text.Analyzers (7)
src\Compilers\Core\Portable\Syntax\SyntaxTreeExtensions.cs (1)
60var fromText = text.ToString(textSpanOpt.Value);
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\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\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (1)
39return document.Text.ToString(TextSpan.FromBounds(tokenLine.Start, token.SpanStart));