76 references to ToTextSpan
Microsoft.CodeAnalysis.CSharp.EditorFeatures (6)
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
223selectionsBeforePaste[0].Span.ToTextSpan(),
StringCopyPaste\StringCopyPasteCommandHandler_CutCopy.cs (1)
86var stringData = StringCopyPasteData.TryCreate(virtualCharService, stringExpression, span.Span.ToTextSpan());
StringCopyPaste\StringCopyPasteHelpers.cs (1)
539=> from.CreateTrackingSpan(span.ToSpan(), SpanTrackingMode.EdgeInclusive).GetSpan(to).Span.ToTextSpan();
StringCopyPaste\UnknownSourcePasteProcessor.cs (3)
95change.OldSpan.ToTextSpan(), 207edits.Add(new TextChange(change.OldSpan.ToTextSpan(), buffer.ToString())); 331edits.Add(new TextChange(change.OldSpan.ToTextSpan(), buffer.ToString()));
Microsoft.CodeAnalysis.EditorFeatures (42)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
153var textSpan = snapshotSpan.Span.ToTextSpan();
BracePairs\BracePairsTaggerProvider.cs (1)
58document, spanToTag.SnapshotSpan.Span.ToTextSpan(), bracePairs, cancellationToken).ConfigureAwait(false);
Classification\CopyPasteAndPrintingClassificationBufferTaggerProvider.Tagger.cs (1)
197await addAsync(span.Span.ToTextSpan(), tempBuffer).ConfigureAwait(false);
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (2)
241document, span.ToTextSpan(), options, classifiedSpans, cancellationToken).ConfigureAwait(false); 246document, span.ToTextSpan(), options, classifiedSpans, cancellationToken).ConfigureAwait(false);
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (4)
343span.Snapshot.AsText(), span.Span.ToTextSpan(), classifiedSpans, CancellationToken.None); 377classificationService.AddSyntacticClassifications(solutionServices, root, span.Span.ToTextSpan(), tempList, cancellationToken); 379classificationService.AddSyntacticClassificationsAsync(lastProcessedDocument, span.Span.ToTextSpan(), tempList, cancellationToken).Wait(cancellationToken); 429var currentClassifiedSpan = new ClassifiedSpan(lastClassifiedSpan.ClassificationType, currentSnapshotSpan.Span.ToTextSpan());
Classification\TotalClassificationTaggerProvider.cs (2)
257static tag => tag.Span.Span.ToTextSpan(), 271=> value.Span.Span.ToTextSpan();
CommentSelection\ToggleLineCommentCommandHandler.cs (2)
132var commentTrackingSpan = new CommentTrackingSpan(selectedSpan.Span.ToTextSpan()); 152var commentTrackingSpan = new CommentTrackingSpan(selectedSpan.Span.ToTextSpan());
Copilot\CopilotTaggerProvider.cs (1)
84await analysisService.AnalyzeDocumentAsync(document, spanToTag.SnapshotSpan.Span.ToTextSpan(), prompts[0], cancellationToken).ConfigureAwait(false);
Copilot\CopilotWpfTextCreationListener.cs (1)
119textChanges.Add(new TextChange(edit.Span.Span.ToTextSpan(), edit.ReplacementText));
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (1)
79document, span.Span.ToTextSpan(), useDefaultBehavior: true, cancellationToken).ConfigureAwait(false);
Extensibility\NavigationBar\NavigationBarItem.cs (1)
66.ToTextSpan();
ExtractMethod\ExtractMethodCommandHandler.cs (1)
125await ExecuteWorkerAsync(view, textBuffer, span.Span.ToTextSpan(), indicatorContext).ConfigureAwait(false);
Formatting\FormatCommandHandler.FormatSelection.cs (1)
53var formattingSpan = selection[0].Span.ToTextSpan();
Formatting\FormatCommandHandler.Paste.cs (1)
76var span = trackingSpan.GetSpan(subjectBuffer.CurrentSnapshot).Span.ToTextSpan();
InlineDiagnostics\AbstractDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (2)
129requestedSpan.Span.ToTextSpan(), 141var copilotDiagnostics = await document.GetCachedCopilotDiagnosticsAsync(requestedSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
InlineHints\InlineHintsDataTaggerProvider.cs (1)
90document, snapshotSpan.Span.ToTextSpan(), options,
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
119var sessionInfo = await renameService.StartInlineSessionAsync(document, selectedSpans.Single().Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
InlineRename\InlineRenameSession.cs (1)
246_openTextBuffers[triggerSpan.Snapshot.TextBuffer].SetReferenceSpans([startingSpan.ToTextSpan()]);
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
628replacement.Kind, replacement.OriginalSpan, trackingSpan.GetSpan(buffer.CurrentSnapshot).Span.ToTextSpan()));
InlineRename\TrackingSpanIntrospector.cs (1)
15=> value.GetSpan(snapshot).Span.ToTextSpan();
IntelliSense\AsyncCompletion\CommitManager.cs (1)
322var changes = formattingService.GetFormattingChangesAsync(currentDocument, subjectBuffer, spanToFormat.Span.ToTextSpan(), cancellationToken).WaitAndGetResult(cancellationToken);
IntelliSense\ViewTextSpan.cs (2)
58return new ViewTextSpan(span.ToTextSpan()); 66return new ViewTextSpan(span.ToTextSpan());
LineSeparators\LineSeparatorTaggerProvider.cs (1)
90var lineSeparatorSpans = await lineSeparatorService.GetLineSeparatorsAsync(document, snapshotSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
Preview\PreviewStaticClassificationTaggerProvider.cs (1)
77var requestSpan = span.Span.ToTextSpan();
RenameTracking\RenameTrackingTaggerProvider.StateMachine.cs (1)
313snapshotSpan.Span.ToTextSpan());
Shared\Extensions\TextChangeExtensions.cs (1)
13=> new(textChange.OldSpan.ToTextSpan(), textChange.NewLength);
Shared\Tagging\Utilities\TagSpanIntervalTree.IntervalIntrospector.cs (1)
21=> GetTranslatedSpan(value, snapshot, trackingMode).Span.ToTextSpan();
SpellCheck\RoslynSpellCheckFixerProvider.cs (1)
96var subSpanBeingRenamed = span.Span.ToTextSpan();
StringIndentation\StringIndentationTaggerProvider.cs (1)
86var regions = await service.GetStringIndentationRegionsAsync(document, snapshotSpan.Span.ToTextSpan(), cancellationToken).ConfigureAwait(false);
Suggestions\SuggestedActionsSource.cs (2)
125return translatedSpan.Span.ToTextSpan(); 223document, range.Span.ToTextSpan(), priorityProvider, cancellationToken).ConfigureAwait(false);
Suggestions\SuggestedActionsSource_Async.cs (1)
239workspace, owner._codeFixService, document, range.Span.ToTextSpan(),
TextDiffing\EditorTextDifferencingService.cs (2)
44diffResult.LeftDecomposition.GetSpanInOriginal(d.Left).ToTextSpan(), 45newText.GetSubText(diffResult.RightDecomposition.GetSpanInOriginal(d.Right).ToTextSpan()).ToString()))];
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (5)
Completion\AbstractCompletionProviderTests.cs (1)
655var selectionSpan = commit.NewSelection ?? textView.Selection.StreamSelectionSpan.SnapshotSpan.Span.ToTextSpan();
NavigateTo\AbstractNavigateToTests.cs (1)
206itemDisplay.GetNameMatchRuns("").Select(s => s.ToTextSpan()).ToImmutableArray());
TextStructureNavigation\AbstractTextStructureNavigationTests.cs (1)
41Assert.Equal(expectedSpans.Single(), extent.Span.Span.ToTextSpan());
Workspaces\EditorTestWorkspace.cs (2)
294mappedSpans[string.Empty] = mappedSpans[string.Empty].Add(mappedSpan.ToTextSpan()); 316mappedSpans[key] = mappedSpans[key].Add(mappedSpan.Value.ToTextSpan());
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
EditorAdapter\SpanExtensionsTest.cs (1)
21var textSpan = span.ToTextSpan();
RenameTracking\RenameTrackingTestState.cs (1)
190var codeAction = await TryGetCodeActionAsync(tag.Span.Span.ToTextSpan());
Microsoft.VisualStudio.LanguageServices (21)
CodeLens\CodeLensCallbackListener.cs (3)
91descriptorContext.ApplicableSpan.Value.ToTextSpan(), 123descriptorContext.ApplicableSpan.Value.ToTextSpan(), 151descriptorContext.ApplicableSpan.Value.ToTextSpan(),
DocumentOutline\DocumentOutlineViewModel.IntervalIntrospector.cs (1)
20=> value.Data.RangeSpan.Span.ToTextSpan();
InheritanceMargin\InheritanceGlyphManager_IntervalTreeData.cs (1)
36=> data.SnapshotSpan.Span.ToTextSpan();
InheritanceMargin\InheritanceMarginTaggerProvider.cs (1)
91var spanToSearch = spanToTag.SnapshotSpan.Span.ToTextSpan();
Preview\FileChange.cs (2)
107var leftText = oldText.GetSubText(leftSpan.ToTextSpan()).ToString(); 108var rightText = newText.GetSubText(rightSpan.ToTextSpan()).ToString();
Snippets\SnippetFunctions\SnippetFunctionGenerateSwitchCases.cs (1)
81switchExpressionSpan = subjectBufferFieldSpan.Span.ToTextSpan();
Venus\ContainedDocument.cs (2)
417if (TryGetSubTextChange(originalText, visibleSpanInOriginalText, rightText, spanInOriginalText, spanInRightText.ToTextSpan(), out var textChange)) 709.Select(s => s.Span.ToTextSpan())
Venus\ContainedDocument.DocumentServiceProvider.cs (10)
117result = new MappedSpanResult(document.FilePath, primarySnapshotSpan.ToLinePositionSpan(), primarySpan.ToTextSpan()); 181var contentSpan = contentSpanOnPrimarySnapshot.Span.ToTextSpan(); 200document, fixedUpSpan.Span.ToTextSpan(), options, includeAdditiveSpans: false, cancellationToken).ConfigureAwait(false); 214var spanOnContentSpan = GetSpanOnContent(mappedSpan.Value.Span.ToTextSpan(), contentSpan); 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()));