3 overrides of GetSubText
Microsoft.CodeAnalysis (3)
Text\ChangedText.cs (1)
142public override SourceText GetSubText(TextSpan span)
Text\CompositeText.cs (1)
83public override SourceText GetSubText(TextSpan span)
Text\SubText.cs (1)
78public override SourceText GetSubText(TextSpan span)
37 references to GetSubText
Microsoft.CodeAnalysis (7)
Text\ChangedText.cs (1)
144return _newText.GetSubText(span);
Text\CompositeText.cs (3)
102AddSegments(newSegments, segment.GetSubText(new TextSpan(segOffset, copyLength))); 222segments[i - 1] = prevSegment.GetSubText(new TextSpan(0, prevSegment.Length - 1)); 224segments[i + 1] = curSegment.GetSubText(new TextSpan(1, curSegment.Length - 1));
Text\SourceText.cs (3)
534return this.GetSubText(new TextSpan(start, this.Length - start)); 798var subText = this.GetSubText(new TextSpan(position, change.Span.Start - position)); 821var subText = this.GetSubText(new TextSpan(position, this.Length - position));
Microsoft.CodeAnalysis.CodeStyle (2)
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (2)
72if (oldText.GetSubText(new TextSpan(change.Span.Start + offset, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 81if (oldText.GetSubText(new TextSpan(change.Span.Start, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText)))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
InlineRename\CSharpEditorInlineRenameService.cs (1)
164resultBuilder.Add((filePath, documentText.GetSubText(surroundingSpanOfInterest.Value).ToString()));
StringCopyPaste\StringCopyPasteCommandHandler.cs (2)
305var originalStringContentsAfterPaste = snapshotAfterPaste.AsText().GetSubText(spanAfterPaste); 306var newStringContentsAfterEdit = newTextAfterChanges.GetSubText(spanAfterPaste);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Diagnostics\LineSpanDirectiveTests.cs (1)
488return $"[|{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.EditorFeatures2.UnitTests (2)
FindReferences\FindReferencesTests.vb (2)
409builder.Append(text.GetSubText(New TextSpan(position, span.Start - position))) 416builder.Append(text.GetSubText(New TextSpan(position, text.Length - position)))
Microsoft.CodeAnalysis.Features (5)
EditAndContinue\EditSession.cs (2)
221if (oldLineSpan != newLineSpan || !oldText.GetSubText(oldLineSpan).ContentEquals(newText.GetSubText(newLineSpan)))
src\Analyzers\Core\Analyzers\Formatting\AbstractFormattingAnalyzer.cs (2)
72if (oldText.GetSubText(new TextSpan(change.Span.Start + offset, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText))) 81if (oldText.GetSubText(new TextSpan(change.Span.Start, change.NewText.Length)).ContentEquals(SourceText.From(change.NewText)))
ValueTracking\ValueTrackedItem.cs (1)
41var subText = SourceText.GetSubText(Span);
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueTestVerifier.cs (2)
397throw new Exception($"Unable to find node with span {span} `{root.GetText().GetSubText(span)}` in:{Environment.NewLine}{root}"); 484var code = text.GetSubText(text.Lines.GetTextSpan(span.Span)).ToString().Replace("\r\n", " ");
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\Completion\CompletionHandler.cs (1)
196var filterText = sourceText.GetSubText(completionList.Span).ToString();
Handler\InlineCompletions\InlineCompletionsHandler.cs (1)
223var formattedLspSnippetText = formattedText.GetSubText(spanContainingFormattedSnippet).WithChanges(lspTextChanges);
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\ILValidation.cs (1)
423var 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)
79var oldText = oldDocumentText.GetSubText(TextSpan.FromBounds(startLineStartPosition, endLineEndPosition)); 117? text.GetSubText(TextSpan.FromBounds(text.Lines[startLine].Start, text.Lines[endLine].End)).ToString()
Microsoft.VisualStudio.LanguageServices (2)
CallHierarchy\CallHierarchyDetail.cs (1)
46return location.SourceTree.GetText().GetSubText(TextSpan.FromBounds(start, end)).ToString();
FindReferences\Entries\AbstractDocumentSpanEntry.cs (1)
106return text.GetSubText(line.Span);
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
Venus\DocumentService_IntegrationTests.vb (1)
328Return 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)