51 references to ToSnapshotSpan
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
EventHookup\EventHookupCommandHandler_TabKeyCommand.cs (1)
314textView.SetSelection(editSpan.ToSnapshotSpan(textView.TextSnapshot));
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
FixInterpolatedVerbatimString\FixInterpolatedVerbatimStringCommandHandlerTests.cs (1)
33view.SetSelection(document.SelectedSpans.Single().ToSnapshotSpan(view.TextBuffer.CurrentSnapshot));
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
85view.SetMultiSelection(originalSelections.Select(selection => selection.ToSnapshotSpan(originalSnapshot)));
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (1)
190var selections = copySpans.Select(s => new Selection(s.ToSnapshotSpan(textBuffer.CurrentSnapshot))).ToArray();
Microsoft.CodeAnalysis.EditorFeatures (17)
BracePairs\BracePairsTaggerProvider.cs (1)
112=> span.IsEmpty ? null : span.ToSnapshotSpan(snapshot);
Classification\Semantic\ClassificationUtilities.cs (1)
34classifiedSpan.TextSpan.ToSnapshotSpan(snapshot),
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
471var lastSnapshotSpan = lastClassifiedSpan.TextSpan.ToSnapshotSpan(lastProcessedSnapshot);
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.PushDiagnosticsTaggerProvider.cs (1)
236.ToSnapshotSpan(diagnosticSnapshot)
Diagnostics\AbstractPushOrPullDiagnosticsTaggerProvider.SingleDiagnosticKindPullTaggerProvider.cs (1)
127.Select(loc => loc.UnmappedFileSpan.GetClampedTextSpan(sourceText).ToSnapshotSpan(snapshot));
ExtractMethod\ExtractMethodCommandHandler.cs (1)
209view.SetSelection(methodNameAtInvocation.Span.ToSnapshotSpan(textSnapshot));
InlineHints\InlineHintsDataTaggerProvider.cs (1)
125hint.Span.ToSnapshotSpan(snapshotSpan.Snapshot),
InlineRename\InlineRenameService.cs (2)
122renameInfo.TriggerSpan.ToSnapshotSpan(snapshot), 152var originalSpan = documentSpan.SourceSpan.ToSnapshotSpan(textSnapshot).TranslateTo(buffer.CurrentSnapshot, SpanTrackingMode.EdgeInclusive);
KeywordHighlighting\HighlighterViewTaggerProvider.cs (1)
122context.AddTag(new TagSpan<KeywordHighlightTag>(span.ToSnapshotSpan(snapshot), KeywordHighlightTag.Instance));
Structure\AbstractStructureTaggerProvider.cs (1)
223context.AddTag(new TagSpan<IStructureTag>(span.TextSpan.ToSnapshotSpan(snapshot), tag));
TextStructureNavigation\AbstractTextStructureNavigatorProvider.cs (1)
38=> new(token.Span.ToSnapshotSpan(position.Snapshot), isSignificant: true);
TextStructureNavigation\AbstractTextStructureNavigatorProvider.TextStructureNavigator.cs (5)
97return new TextExtent(trivia.Span.ToSnapshotSpan(position.Snapshot), isSignificant: true); 149return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot); 185return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot); 237return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot); 290return node == null ? activeSpan : node.Value.Span.ToSnapshotSpan(activeSpan.Snapshot);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Workspaces\TestWorkspace.cs (2)
485var snapshotSpan = span.ToSnapshotSpan(document.GetTextBuffer().CurrentSnapshot); 502var snapshotSpan = span.ToSnapshotSpan(document.GetTextBuffer().CurrentSnapshot);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
EditorAdapter\TextSpanExtensionsTest.cs (2)
40var ss = textSpan.ToSnapshotSpan(snapshot); 52var ss = textSpan.ToSnapshotSpan(snapshot);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (4)
InlineHints\InlineHintsTag.cs (1)
288textChange.Span.ToSnapshotSpan(snapshot).TranslateTo(subjectBuffer.CurrentSnapshot, SpanTrackingMode.EdgeExclusive),
LineSeparators\LineSeparatorTaggerProvider.cs (1)
115context.AddTag(new TagSpan<LineSeparatorTag>(span.ToSnapshotSpan(snapshotSpan.Snapshot), tag));
StringIndentation\StringIndentationTaggerProvider.cs (2)
115region.IndentSpan.ToSnapshotSpan(snapshot), 119region.OrderedHoleSpans.SelectAsArray(s => s.ToSnapshotSpan(snapshot)))));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (4)
FindReferences\FindReferencesCommandHandlerTests.vb (1)
37testDocument.AnnotatedSpans("Selection").Single().ToSnapshotSpan(snapshot), isReversed:=False)
Rename\RenameCommandHandlerTests.vb (3)
45Assert.Equal(expectedTriggerToken.Span.ToSnapshotSpan(view.TextSnapshot), view.Selection.SelectedSpans.Single()) 97Dim selectedSpan = workspace.Documents.Single(Function(d) d.SelectedSpans.Any()).SelectedSpans.Single().ToSnapshotSpan(document.GetTextBuffer().CurrentSnapshot) 123Dim selectedSpan = workspace.Documents.Single(Function(d) d.SelectedSpans.Any()).SelectedSpans.Single().ToSnapshotSpan(document.GetTextBuffer().CurrentSnapshot)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (5)
AutomaticEndConstructCorrection\AutomaticEndConstructCorrector.vb (2)
114Return {New LetterOnlyTrackingSpan(startToken.Span.ToSnapshotSpan(snapshot)), New LetterOnlyTrackingSpan(endToken.Span.ToSnapshotSpan(snapshot))}
EndConstructGeneration\EndConstructStatementVisitor_IfStatement.vb (1)
50Return New ReplaceSpanResult(node.FullSpan.ToSnapshotSpan(_subjectBuffer.CurrentSnapshot), ifNodeToken.ToFullString(), position)
EndConstructGeneration\EndConstructStatementVisitor_LambdaHeader.vb (2)
69Return New ReplaceSpanResult(originalNode.FullSpan.ToSnapshotSpan(_subjectBuffer.CurrentSnapshot), 97Return New ReplaceSpanResult(originalNode.FullSpan.ToSnapshotSpan(_subjectBuffer.CurrentSnapshot),
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (3)
AutomaticEndConstructCorrection\AutomaticEndConstructCorrectorTests.vb (2)
350Dim trackingSpan = New LetterOnlyTrackingSpan(span.ToSnapshotSpan(initialTextSnapshot)) 357Dim trackingSpan = New LetterOnlyTrackingSpan(beginSpan.ToSnapshotSpan(initialTextSnapshot))
ExtractMethod\ExtractMethodTests.vb (1)
100Dim snapshotSpan = textSpan.ToSnapshotSpan(testDocument.GetTextBuffer().CurrentSnapshot)
Microsoft.VisualStudio.LanguageServices (9)
FindReferences\Entries\DocumentSpanEntry.cs (1)
269textBuffer.Properties.AddProperty(key, new NormalizedSnapshotSpanCollection(span.ToSnapshotSpan(textBuffer.CurrentSnapshot)));
Implementation\AbstractVsTextViewFilter.cs (4)
126var resultSpan = dataTipInfo.Span.ToSnapshotSpan(textSnapshot); 207var resultsInView = textView.GetSpanInView(matchingSpan.Value.ToSnapshotSpan(subjectBuffer.CurrentSnapshot)).ToList(); 238var vsClosingSpans = textView.GetSpanInView(closingSpans.Value.ToSnapshotSpan(subjectBuffer.CurrentSnapshot)).First().ToVsTextSpan(); 257var vsOpeningSpans = textView.GetSpanInView(openingSpans.Value.ToSnapshotSpan(subjectBuffer.CurrentSnapshot)).First().ToVsTextSpan();
LanguageService\AbstractLanguageService`2.IVsLanguageBlock.cs (1)
59ptsBlockSpan[0] = foundBlock.Value.span.ToSnapshotSpan(snapshot).ToVsTextSpan();
LanguageService\AbstractLanguageService`2.VsLanguageDebugInfo.cs (1)
363pCodeSpan[0] = breakpoint.TextSpan.ToSnapshotSpan(snapshot).ToVsTextSpan();
Venus\ContainedDocument.DocumentServiceProvider.cs (2)
106foreach (var primarySpan in primarySnapshot.MapFromSourceSnapshot(span.ToSnapshotSpan(roslynSnapshot))) 267var primarySpans = primarySnapshot.MapFromSourceSnapshot(span.ToSnapshotSpan(roslynSnapshot));
Microsoft.VisualStudio.LanguageServices.UnitTests (1)
DebuggerIntelliSense\TestState.vb (1)
42Dim span = New TextManager.Interop.TextSpan() {statementSpan.ToSnapshotSpan(spanDocument.GetTextBuffer().CurrentSnapshot).ToVsTextSpan()}