75 references to ToTextSpan
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
240selectionsBeforePaste[0].Span.ToTextSpan(),
StringCopyPaste\StringCopyPasteCommandHandler_CutCopy.cs (1)
96var stringData = StringCopyPasteData.TryCreate(virtualCharService, stringExpression, span.Span.ToTextSpan());
StringCopyPaste\StringCopyPasteHelpers.cs (1)
543=> from.CreateTrackingSpan(span.ToSpan(), SpanTrackingMode.EdgeInclusive).GetSpan(to).Span.ToTextSpan();
StringCopyPaste\UnknownSourcePasteProcessor.cs (3)
103change.OldSpan.ToTextSpan(), 215edits.Add(new TextChange(change.OldSpan.ToTextSpan(), buffer.ToString())); 339edits.Add(new TextChange(change.OldSpan.ToTextSpan(), buffer.ToString()));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
SuggestionTags\SuggestionTagProducerTests.cs (1)
40Assert.Equal(selection, spans.Single().Span.Span.ToTextSpan());
Microsoft.CodeAnalysis.EditorFeatures (29)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
167var textSpan = snapshotSpan.Span.ToTextSpan();
BracePairs\BracePairsTaggerProvider.cs (1)
93document, spanToTag.SnapshotSpan.Span.ToTextSpan(), bracePairs, cancellationToken).ConfigureAwait(false);
Classification\Semantic\ClassificationUtilities.cs (2)
198document, snapshotSpan.Span.ToTextSpan(), options, classifiedSpans, cancellationToken).ConfigureAwait(false); 203document, snapshotSpan.Span.ToTextSpan(), options, classifiedSpans, cancellationToken).ConfigureAwait(false);
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (4)
411span.Snapshot.AsText(), span.Span.ToTextSpan(), classifiedSpans, CancellationToken.None); 428classificationService.AddSyntacticClassificationsAsync(document, span.Span.ToTextSpan(), tempList, cancellationToken).Wait(cancellationToken); 430classificationService.AddSyntacticClassifications(document.Project.Solution.Services, root, span.Span.ToTextSpan(), tempList, cancellationToken); 474var currentClassifiedSpan = new ClassifiedSpan(lastClassifiedSpan.ClassificationType, currentSnapshotSpan.Span.ToTextSpan());
CommentSelection\AbstractCommentSelectionBase.cs (1)
156var formattingSpans = trackingSnapshotSpans.Select(change => CommonFormattingHelpers.GetFormattingSpan(newRoot, change.Span.ToTextSpan()));
CommentSelection\ToggleLineCommentCommandHandler.cs (2)
138var commentTrackingSpan = new CommentTrackingSpan(selectedSpan.Span.ToTextSpan()); 158var commentTrackingSpan = new CommentTrackingSpan(selectedSpan.Span.ToTextSpan());
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (1)
118requestedSpan.Span.ToTextSpan(),
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (1)
92document, span.Span.ToTextSpan(), _globalOptions.CreateProvider(), useDefaultBehavior: true, cancellationToken).ConfigureAwait(false);
Extensibility\NavigationBar\NavigationBarItem.cs (1)
78.ToTextSpan();
ExtractMethod\ExtractMethodCommandHandler.cs (1)
132await ExecuteWorkerAsync(view, textBuffer, span.Span.ToTextSpan(), indicatorContext).ConfigureAwait(false);
Formatting\FormatCommandHandler.FormatSelection.cs (1)
54var formattingSpan = selection[0].Span.ToTextSpan();
Formatting\FormatCommandHandler.Paste.cs (1)
81var span = trackingSpan.GetSpan(subjectBuffer.CurrentSnapshot).Span.ToTextSpan();
InlineHints\InlineHintsDataTaggerProvider.cs (1)
117var hints = await service.GetInlineHintsAsync(document, snapshotSpan.Span.ToTextSpan(), options, cancellationToken).ConfigureAwait(false);
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
116var sessionInfo = await _renameService.StartInlineSessionAsync(document, selectedSpans.Single().Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameSession.cs (1)
258_openTextBuffers[triggerSpan.Snapshot.TextBuffer].SetReferenceSpans(SpecializedCollections.SingletonEnumerable(startingSpan.ToTextSpan()));
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
626yield return new InlineRenameReplacement(replacement.Kind, replacement.OriginalSpan, trackingSpan.GetSpan(buffer.CurrentSnapshot).Span.ToTextSpan());
IntelliSense\AsyncCompletion\CommitManager.cs (1)
305var changes = formattingService.GetFormattingChangesAsync(currentDocument, subjectBuffer, spanToFormat.Span.ToTextSpan(), cancellationToken).WaitAndGetResult(cancellationToken);
IntelliSense\ViewTextSpan.cs (2)
70return new ViewTextSpan(span.ToTextSpan()); 78return new ViewTextSpan(span.ToTextSpan());
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
318snapshotSpan.Span.ToTextSpan());
Shared\Extensions\TextChangeExtensions.cs (1)
13=> new(textChange.OldSpan.ToTextSpan(), textChange.NewLength);
SpellCheck\RoslynSpellCheckFixerProvider.cs (1)
101var subSpanBeingRenamed = span.Span.ToTextSpan();
TextDiffing\EditorTextDifferencingService.cs (2)
55diffResult.LeftDecomposition.GetSpanInOriginal(d.Left).ToTextSpan(), 56newText.GetSubText(diffResult.RightDecomposition.GetSpanInOriginal(d.Right).ToTextSpan()).ToString())).ToImmutableArray();
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (4)
Snippets\CSharpSnippets\SnippetFunctions\SnippetFunctionGenerateSwitchCases.cs (1)
59var expressionSpan = subjectBufferFieldSpan.Span.ToTextSpan();
SuggestedActionsSource.cs (3)
280workspace, state.Target.Owner._codeFixService, document, range.Span.ToTextSpan(), 439document, range.Span.ToTextSpan(), priority, fallbackOptions, isBlocking: false, cancellationToken).ConfigureAwait(false); 509return translatedSpan.Span.ToTextSpan();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
NavigateTo\AbstractNavigateToTests.cs (1)
207itemDisplay.GetNameMatchRuns("").Select(s => s.ToTextSpan()).ToImmutableArray());
TextStructureNavigation\AbstractTextStructureNavigationTests.cs (1)
41Assert.Equal(expectedSpans.Single(), extent.Span.Span.ToTextSpan());
Workspaces\TestWorkspace.cs (2)
487mappedSpans[string.Empty] = mappedSpans[string.Empty].Add(mappedSpan.ToTextSpan()); 511mappedSpans[key] = mappedSpans[key].Add(mappedSpan.Value.ToTextSpan());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
EditorAdapter\SpanExtensionsTest.cs (1)
24var textSpan = span.ToTextSpan();
RenameTracking\RenameTrackingTestState.cs (1)
195var codeAction = await TryGetCodeActionAsync(tag.Span.Span.ToTextSpan());
Microsoft.CodeAnalysis.EditorFeatures.Wpf (6)
LineSeparators\LineSeparatorTaggerProvider.cs (1)
102var lineSeparatorSpans = await lineSeparatorService.GetLineSeparatorsAsync(document, snapshotSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
Preview\PreviewStaticClassificationTaggerProvider.cs (1)
75var requestSpan = span.Span.ToTextSpan();
StringIndentation\StringIndentationTaggerProvider.cs (1)
98var regions = await service.GetStringIndentationRegionsAsync(document, snapshotSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
Suggestions\SuggestedActionsSource.cs (3)
280workspace, state.Target.Owner._codeFixService, document, range.Span.ToTextSpan(), 439document, range.Span.ToTextSpan(), priority, fallbackOptions, isBlocking: false, cancellationToken).ConfigureAwait(false); 509return translatedSpan.Span.ToTextSpan();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
KeywordHighlighting\AbstractKeywordHighlightingTests.vb (1)
48Select (tag.Span.Span.ToTextSpan().ToString())
ReferenceHighlighting\AbstractReferenceHighlightingTests.vb (1)
52Select spanType + ":" + tag.Span.Span.ToTextSpan().ToString()
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
EndConstructGeneration\ReplaceSpanResult.vb (1)
40subjectBuffer.ApplyChange(New TextChange(_snapshotSpan.TranslateTo(current, SpanTrackingMode.EdgeExclusive).Span.ToTextSpan(), _replacementText))
LineCommit\CommitFormatter.vb (1)
69Dim textSpanToFormat = spanToFormat.Span.ToTextSpan()
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (1)
ExtractMethod\ExtractMethodTests.vb (1)
109Dim validator = New VisualBasicSelectionValidator(sdocument, snapshotSpan.Span.ToTextSpan(), extractOptions)
Microsoft.VisualStudio.IntegrationTest.Utilities (1)
InProcess\Editor_InProc.cs (1)
626return matchingTags.Select(t => t.Span.GetSpans(view.TextBuffer).Single().Span.ToTextSpan()).SelectMany(t => new List<int> { t.Start, t.Length }).ToArray();
Microsoft.VisualStudio.LanguageServices (17)
CodeLens\CodeLensCallbackListener.cs (1)
156var textSpan = descriptorContext.ApplicableSpan.Value.ToTextSpan();
InheritanceMargin\InheritanceMarginTaggerProvider.cs (1)
116var spanToSearch = spanToTag.SnapshotSpan.Span.ToTextSpan();
Preview\FileChange.cs (2)
105var leftText = oldText.GetSubText(leftSpan.ToTextSpan()).ToString(); 106var rightText = newText.GetSubText(rightSpan.ToTextSpan()).ToString();
Snippets\SnippetFunctions\SnippetFunctionGenerateSwitchCases.cs (1)
84switchExpressionSpan = subjectBufferFieldSpan.Span.ToTextSpan();
Venus\ContainedDocument.cs (2)
420if (TryGetSubTextChange(originalText, visibleSpanInOriginalText, rightText, spanInOriginalText, spanInRightText.ToTextSpan(), out var textChange)) 712.Select(s => s.Span.ToTextSpan())
Venus\ContainedDocument.DocumentServiceProvider.cs (10)
118result = new MappedSpanResult(document.FilePath, primarySnapshotSpan.ToLinePositionSpan(), primarySpan.ToTextSpan()); 182var contentSpan = contentSpanOnPrimarySnapshot.Span.ToTextSpan(); 201document, fixedUpSpan.Span.ToTextSpan(), options, includeAdditiveSpans: false, cancellationToken).ConfigureAwait(false); 215var spanOnContentSpan = GetSpanOnContent(mappedSpan.Value.Span.ToTextSpan(), contentSpan); 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()));