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)
49 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)); 824var subText = this.GetSubText(new TextSpan(position, change.Span.Start - position)); 847var 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 (1)
Parser\Lexer.cs (1)
1991var text = TextWindow.Text.GetSubText(TextSpan.FromBounds(savePosition, TextWindow.Position));
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
InlineRename\CSharpEditorInlineRenameService.cs (1)
165resultBuilder.Add((filePath, documentText.GetSubText(surroundingSpanOfInterest.Value).ToString()));
StringCopyPaste\StringCopyPasteCommandHandler.cs (2)
300var originalStringContentsAfterPaste = snapshotAfterPaste.AsText().GetSubText(spanAfterPaste); 301var newStringContentsAfterEdit = newTextAfterChanges.GetSubText(spanAfterPaste);
Microsoft.CodeAnalysis.CSharp.Features (4)
BraceCompletion\AbstractCurlyBraceOrBracketCompletionService.cs (1)
210var newTextChangeText = formattedText.GetSubText(new TextSpan(newRange.Span.Start + amountToShift, newRange.NewLength)).ToString();
SplitStringLiteral\SimpleStringSplitter.cs (3)
41var prefix = Document.Text.GetSubText(TextSpan.FromBounds(_token.SpanStart, CursorPosition)).ToString(); 42var suffix = Document.Text.GetSubText(TextSpan.FromBounds(CursorPosition, _token.Span.End)).ToString(); 47? Document.Text.GetSubText(TextSpan.FromBounds(_token.Span.End - "u8".Length, _token.Span.End)).ToString()
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.EditorFeatures (1)
TextDiffing\EditorTextDifferencingService.cs (1)
45newText.GetSubText(diffResult.RightDecomposition.GetSpanInOriginal(d.Right).ToTextSpan()).ToString()))];
Microsoft.CodeAnalysis.Features (6)
Completion\Providers\Snippets\AbstractSnippetCompletionProvider.cs (1)
56var snippetText = allChangesText.GetSubText(textSpan).ToString();
EditAndContinue\EditSession.cs (2)
217if (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)
40var subText = SourceText.GetSubText(Span);
Microsoft.CodeAnalysis.Features.Test.Utilities (2)
EditAndContinue\EditAndContinueTestVerifier.cs (2)
452throw new Exception($"Unable to find node with span {span} `{root.GetText().GetSubText(span)}` in:{Environment.NewLine}{root}"); 534var code = text.GetSubText(text.Lines.GetTextSpan(span.Span)).ToString().Replace("\r\n", " ");
Microsoft.CodeAnalysis.LanguageServer.Protocol (4)
Handler\Completion\CompletionHandler.cs (1)
194var filterText = sourceText.GetSubText(completionList.Span).ToString();
Handler\Completion\CompletionResultFactory.cs (1)
75var typedText = documentText.GetSubText(defaultSpan).ToString();
Handler\InlineCompletions\InlineCompletionsHandler.cs (2)
138var wordText = sourceText.GetSubText(wordOnLeft.Value).ToString(); 230var formattedLspSnippetText = formattedText.GetSubText(spanContainingFormattedSnippet).WithChanges(lspTextChanges);
Microsoft.CodeAnalysis.Test.Utilities (1)
Metadata\ILValidation.cs (1)
475var subtext = text.GetSubText(span);
Microsoft.CodeAnalysis.UnitTests (7)
Text\TextChangeTests.cs (7)
41var subText = text.GetSubText(new TextSpan(0, 5)); 49var subText = text.GetSubText(new TextSpan(6, 5)); 57var subText = text.GetSubText(new TextSpan(4, 3)); 65var subText = text.GetSubText(new TextSpan(0, 5)); 66var subSubText = subText.GetSubText(new TextSpan(0, 0)); 217var subText = newText.GetSubText(new TextSpan(3, 4)); 415var subtext = text.GetSubText(new TextSpan(5, 10));
Microsoft.CodeAnalysis.Workspaces (2)
LinkedFileDiffMerging\AbstractLinkedFileMergeConflictCommentAdditionService.cs (2)
74var oldText = oldDocumentText.GetSubText(TextSpan.FromBounds(startLineStartPosition, endLineEndPosition)); 144? text.GetSubText(TextSpan.FromBounds(text.Lines[startLine].Start, text.Lines[endLine].End)).ToString()
Microsoft.VisualStudio.LanguageServices (6)
CallHierarchy\CallHierarchyDetail.cs (1)
46return location.SourceTree.GetText().GetSubText(TextSpan.FromBounds(start, end)).ToString();
FindReferences\Entries\AbstractDocumentSpanEntry.cs (1)
98return text.GetSubText(line.Span);
Preview\FileChange.cs (2)
107var leftText = oldText.GetSubText(leftSpan.ToTextSpan()).ToString(); 108var rightText = newText.GetSubText(rightSpan.ToTextSpan()).ToString();
Venus\ContainedDocument.DocumentServiceProvider.cs (2)
282return (line.Snapshot.AsText().GetSubText(contentSpan.Span.ToTextSpan()), GetSpanOnContent(primarySpan.Span.ToTextSpan(), contentSpan.Span.ToTextSpan())); 287return (line.Snapshot.AsText().GetSubText(contentSpan.Span.ToTextSpan()), GetSpanOnContent(primarySpan.Span.ToTextSpan(), contentSpan.Span.ToTextSpan()));
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
85return text.GetSubText(TextSpan.FromBounds(start, end)).ToString();