3 overrides of GetSubText
Microsoft.CodeAnalysis (3)
Text\ChangedText.cs (1)
143public override SourceText GetSubText(TextSpan span)
Text\CompositeText.cs (1)
78public override SourceText GetSubText(TextSpan span)
Text\SubText.cs (1)
73public override SourceText GetSubText(TextSpan span)
46 references to GetSubText
Microsoft.CodeAnalysis (5)
Text\ChangedText.cs (1)
145return _newText.GetSubText(span);
Text\CompositeText.cs (1)
97AddSegments(newSegments, segment.GetSubText(new TextSpan(segOffset, copyLength)));
Text\SourceText.cs (3)
523return this.GetSubText(new TextSpan(start, this.Length - start)); 688var subText = this.GetSubText(new TextSpan(position, change.Span.Start - position)); 711var subText = this.GetSubText(new TextSpan(position, this.Length - position));
Microsoft.CodeAnalysis.CodeStyle (2)
FormattingAnalyzerHelper.cs (2)
41if (oldText.GetSubText(new TextSpan(change.Span.Start + offset, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 50if (oldText.GetSubText(new TextSpan(change.Span.Start, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText)))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
StringCopyPaste\StringCopyPasteCommandHandler.cs (2)
316var originalStringContentsAfterPaste = snapshotAfterPaste.AsText().GetSubText(spanAfterPaste); 317var newStringContentsAfterEdit = newTextAfterChanges.GetSubText(spanAfterPaste);
Microsoft.CodeAnalysis.CSharp.Features (4)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
198var newTextChangeText = formattedText.GetSubText(new TextSpan(newRange.Span.Start + amountToShift, newRange.NewLength)).ToString();
SplitStringLiteral\SimpleStringSplitter.cs (3)
48var prefix = Document.Text.GetSubText(TextSpan.FromBounds(_token.SpanStart, CursorPosition)).ToString(); 49var suffix = Document.Text.GetSubText(TextSpan.FromBounds(CursorPosition, _token.Span.End)).ToString(); 54? Document.Text.GetSubText(TextSpan.FromBounds(_token.Span.End - "u8".Length, _token.Span.End)).ToString()
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Diagnostics\LineSpanDirectiveTests.cs (1)
491return $"[|{mappedText.GetSubText(span)}|]";
Diagnostics\LocationsTests.cs (1)
77return tree.GetLineMappings().Select(mapping => $"[|{text.GetSubText(text.Lines.GetTextSpan(mapping.Span))}|] -> {(mapping.IsHidden ? "<hidden>" : mapping.MappedSpan)}");
Microsoft.CodeAnalysis.EditorFeatures (2)
IntelliSense\QuickInfo\IntellisenseQuickInfoBuilder.cs (1)
119var textRunsOfSpan = spans.Select(s => new ClassifiedTextRun(s.ClassificationType, text.GetSubText(s.TextSpan).ToString(), ClassifiedTextRunStyle.UseClassificationFont)).ToList();
TextDiffing\EditorTextDifferencingService.cs (1)
56newText.GetSubText(diffResult.RightDecomposition.GetSpanInOriginal(d.Right).ToTextSpan()).ToString())).ToImmutableArray();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
EditAndContinue\EditAndContinueTestHelpers.cs (1)
433var code = text.GetSubText(text.Lines.GetTextSpan(span.Span)).ToString().Replace("\r\n", " ");
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
FindReferences\FindReferencesTests.vb (3)
443builder.Append(text.GetSubText(New TextSpan(position, span.Start - position))) 445builder.Append(text.GetSubText(span)) 450builder.Append(text.GetSubText(New TextSpan(position, text.Length - position)))
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\EditSession.cs (2)
227if (oldLineSpan != newLineSpan || !oldText.GetSubText(oldLineSpan).ContentEquals(newText.GetSubText(newLineSpan)))
FormattingAnalyzerHelper.cs (2)
41if (oldText.GetSubText(new TextSpan(change.Span.Start + offset, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 50if (oldText.GetSubText(new TextSpan(change.Span.Start, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText)))
ValueTracking\ValueTrackedItem.cs (1)
45var subText = SourceText.GetSubText(Span);
Microsoft.CodeAnalysis.LanguageServer.Protocol (3)
Handler\Completion\CompletionHandler.cs (1)
371var filterText = sourceText.GetSubText(completionListSpan).ToString();
Handler\InlineCompletions\InlineCompletionsHandler.cs (2)
88var wordText = sourceText.GetSubText(wordOnLeft.Value).ToString(); 186var formattedLspSnippetText = formattedText.GetSubText(spanContainingFormattedSnippet).WithChanges(lspTextChanges);
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\ILValidation.cs (1)
421var subtext = text.GetSubText(span);
Microsoft.CodeAnalysis.UnitTests (5)
Text\TextChangeTests.cs (5)
41var subText = text.GetSubText(new TextSpan(0, 5)); 49var subText = text.GetSubText(new TextSpan(6, 5)); 57var subText = text.GetSubText(new TextSpan(4, 3)); 194var subText = newText.GetSubText(new TextSpan(3, 4)); 392var subtext = text.GetSubText(new TextSpan(5, 10));
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (1)
LocationTests.vb (1)
64Return tree.GetLineMappings().Select(Function(mapping) $"[|{text.GetSubText(text.Lines.GetTextSpan(mapping.Span))}|] -> {If(mapping.IsHidden, "<hidden>", mapping.MappedSpan.ToString())}")
Microsoft.CodeAnalysis.Workspaces (2)
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (2)
76var oldText = oldDocumentText.GetSubText(TextSpan.FromBounds(startLineStartPosition, endLineEndPosition)); 114? text.GetSubText(TextSpan.FromBounds(text.Lines[startLine].Start, text.Lines[endLine].End)).ToString()
Microsoft.VisualStudio.LanguageServices (6)
CallHierarchy\CallHierarchyDetail.cs (1)
53return location.SourceTree.GetText().GetSubText(TextSpan.FromBounds(start, end)).ToString();
FindReferences\Entries\AbstractDocumentSpanEntry.cs (1)
83return text.GetSubText(line.Span);
Preview\FileChange.cs (2)
105var leftText = oldText.GetSubText(leftSpan.ToTextSpan()).ToString(); 106var rightText = newText.GetSubText(rightSpan.ToTextSpan()).ToString();
Venus\ContainedDocument.DocumentServiceProvider.cs (2)
283return (line.Snapshot.AsText().GetSubText(contentSpan.Span.ToTextSpan()), GetSpanOnContent(primarySpan.Span.ToTextSpan(), contentSpan.Span.ToTextSpan())); 288return (line.Snapshot.AsText().GetSubText(contentSpan.Span.ToTextSpan()), GetSpanOnContent(primarySpan.Span.ToTextSpan(), contentSpan.Span.ToTextSpan()));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
89return text.GetSubText(TextSpan.FromBounds(start, end)).ToString();
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Venus\DocumentService_IntegrationTests.vb (1)
326Return New ExcerptResult(mappedSource.GetSubText(line.Span), New TextSpan(mappedSpan.Start - line.Start, mappedSpan.Length), ImmutableArray.Create(New ClassifiedSpan(New TextSpan(0, line.Span.Length), ClassificationTypeNames.Text)), document, span)