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