1 write to SelectedSpans
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (1)
Workspaces\TestHostDocument.cs (1)
118
this.
SelectedSpans
= textSpans;
53 references to SelectedSpans
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (16)
AddMissingImports\CSharpAddMissingImportsRefactoringProviderTests.cs (1)
32
var pastedTextSpan = hostDocument.
SelectedSpans
.FirstOrDefault();
CodeActions\MoveType\MoveTypeTests.MoveScope.cs (1)
918
var textSpan = workspace.Documents[0].
SelectedSpans
[0];
CodeActions\SyncNamespace\CSharpSyncNamespaceTestsBase.cs (2)
145
var project = workspace.Documents.Single(doc => !doc.
SelectedSpans
.IsEmpty()).Project;
155
var originalDocument = workspace.Documents.Single(doc => !doc.
SelectedSpans
.IsEmpty());
CommentSelection\CSharpCommentSelectionTests.cs (1)
132
SetupSelection(doc.GetTextView(), doc.
SelectedSpans
.Select(s => Span.FromBounds(s.Start, s.End)));
Debugging\DataTipInfoGetterTests.cs (2)
50
var expectedSpan = testHostDocument.
SelectedSpans
.Any()
51
? testHostDocument.
SelectedSpans
.Single()
EncapsulateField\EncapsulateFieldTestState.cs (1)
34
_testDocument = Workspace.Documents.Single(d => d.CursorPosition.HasValue || d.
SelectedSpans
.Any());
ExtractMethod\ExtractMethodBase.cs (2)
38
var textSpan = testDocument.
SelectedSpans
.Single();
128
var validator = new CSharpSelectionValidator(semanticDocument, testDocument.
SelectedSpans
.Single(), localFunction: false);
ExtractMethod\MiscTests.cs (2)
134
view.TextBuffer.CurrentSnapshot, testDocument.
SelectedSpans
[0].Start, testDocument.
SelectedSpans
[0].Length), isReversed: false);
FixInterpolatedVerbatimString\FixInterpolatedVerbatimStringCommandHandlerTests.cs (1)
30
view.SetSelection(document.
SelectedSpans
.Single().ToSnapshotSpan(view.TextBuffer.CurrentSnapshot));
Formatting\FormattingEngineTests.cs (1)
438
var spans = subjectDocument.
SelectedSpans
;
Formatting\Indentation\SmartIndenterTests.cs (1)
3467
provider.TextSpan = subjectDocument.
SelectedSpans
.Single();
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (1)
76
var originalSelections = document.
SelectedSpans
;
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (20)
AbstractCommandHandlerTestState.cs (2)
77
var cursorDocument = Workspace.Documents.First(d => d.CursorPosition.HasValue || d.
SelectedSpans
.Any(ss => ss.IsEmpty));
81
var cursorPosition = cursorDocument.CursorPosition ?? cursorDocument.
SelectedSpans
.First(ss => ss.IsEmpty).Start;
CommentSelection\AbstractToggleCommentTestBase.cs (2)
38
SetupSelection(doc.GetTextView(), doc.
SelectedSpans
.Select(s => Span.FromBounds(s.Start, s.End)));
55
SetupSelection(document.GetTextView(), document.
SelectedSpans
.Select(s => Span.FromBounds(s.Start, s.End)));
CompleteStatement\AbstractCompleteStatementTests.cs (4)
103
Assert.True(testDocument.CursorPosition.HasValue || testDocument.
SelectedSpans
.Any(), "No caret position or selected spans are set!");
104
var startCaretPosition = testDocument.CursorPosition ?? testDocument.
SelectedSpans
.Last().End;
108
if (testDocument.
SelectedSpans
.Any())
110
var selectedSpan = testDocument.
SelectedSpans
[0];
DocumentationComments\AbstractDocumentationCommentTests.cs (2)
148
if (testDocument.
SelectedSpans
.Any())
150
var selectedSpan = testDocument.
SelectedSpans
[0];
GoToAdjacentMember\AbstractGoToAdjacentMemberTests.cs (1)
50
Assert.Equal(hostDocument.
SelectedSpans
.Single().Start, targetPosition.Value);
KeywordHighlighting\AbstractKeywordHighlighterTests.cs (1)
45
var expectedHighlightSpans = testDocument.
SelectedSpans
.ToList();
ObsoleteSymbol\AbstractObsoleteSymbolTests.cs (1)
40
var expectedSpans = workspace.Documents[i].
SelectedSpans
.OrderBy(s => s.Start);
ReassignedVariable\AbstractReassignedVariableTests.cs (1)
39
var expectedSpans = workspace.Documents[i].
SelectedSpans
.OrderBy(s => s.Start);
SignatureHelp\AbstractSignatureHelpProviderTests.cs (2)
358
var selectedSpans = testWorkspace.Documents.First(d => d.Name == "SourceDocument").
SelectedSpans
;
475
var selectedSpans = testWorkspace.Documents.Single(d => d.Name == "SourceDocument").
SelectedSpans
;
TaskList\AbstractTaskListTests.cs (1)
42
var expectedLists = hostDocument.
SelectedSpans
;
Workspaces\EditorTestHostDocument.cs (2)
132
else if (this.
SelectedSpans
.IsSingle())
134
var span = this.
SelectedSpans
.Single();
Workspaces\EditorTestWorkspace.cs (1)
266
foreach (var span in document.
SelectedSpans
)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (10)
CodeGeneration\CodeGenerationTests.cs (3)
885
var destSpan = Workspace.Documents.Single().
SelectedSpans
.Single();
891
var destSpan = Workspace.Documents.Single().
SelectedSpans
.Single();
918
var destSpan = Workspace.Documents.Single().
SelectedSpans
.Single();
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
315
var symbol = semanticModel.GetSymbolInfo(syntaxRoot.FindNode(testDocument.
SelectedSpans
.Single())).Symbol;
RenameTracking\RenameTrackingTaggerProviderTests.cs (5)
381
var textSpan = state.HostDocument.
SelectedSpans
.Single();
395
var textSpan = state.HostDocument.
SelectedSpans
.Single();
409
var textSpan = state.HostDocument.
SelectedSpans
.Single();
429
var textSpan = state.HostDocument.
SelectedSpans
.Single();
853
var textSpan = state.HostDocument.
SelectedSpans
.Single();
StackTraceExplorer\StackTraceExplorerTests.cs (1)
46
var selectedSpan = cursorDoc.
SelectedSpans
.Single();
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
RelatedDocuments\AbstractRelatedDocumentsTests.cs (1)
48
var expectedSortedResults = workspace.Documents.Where(d => d.
SelectedSpans
.Count > 0).Select(d => d.Id).OrderBy(d => d.Id);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
F1Help\F1HelpTests.cs (1)
31
var actualText = await service.GetHelpTermAsync(workspace.CurrentSolution.Projects.First().Documents.First(), workspace.Documents.First().
SelectedSpans
.First(), CancellationToken.None);
Microsoft.VisualStudio.LanguageServices.UnitTests (5)
AbstractTextViewFilterTests.vb (1)
47
Dim matchingSpan = projected.
SelectedSpans
.Single()
Snippets\SnippetExpansionClientTestsHelper.vb (2)
19
Dim snippetSpanInSurfaceBuffer = surfaceBufferDocument.
SelectedSpans
(0)
70
Dim snippetSpan = document.
SelectedSpans
(0)
Venus\DocumentService_IntegrationTests.vb (2)
286
ElseIf testDocument.
SelectedSpans
.First() = span Then
321
ElseIf testDocument.
SelectedSpans
.First() = span Then