1 write to _selection
System.Windows.Forms.Design (1)
System\ComponentModel\Design\SelectionService.cs (1)
61_selection = [];
34 references to _selection
System.Windows.Forms.Design (34)
System\ComponentModel\Design\SelectionService.cs (34)
59if (_selection is null) 80if (!_selection.Contains(selection)) 82_selection.Add(selection); 110if (_selection is not null && ce.Component is not null && _selection.Contains(ce.Component)) 168internal IComponent? PrimarySelection => _selection?.Count > 0 ? _selection[0] : null; 173internal void RemoveSelection(IComponent selection) => _selection?.Remove(selection); 215Debug.Assert(_selection is not null, "Should be impossible to update the help context before configuring the selection hash"); 217if (_selection.Count == 0) 221else if (_selection.Count == 1) 223if (GetService(typeof(IDesignerHost)) is IDesignerHost host && _selection.Contains(host.RootComponent)) 231for (int i = 0; i < _selection.Count; i++) 233object component = _selection[i]; 256int count = _selection.Count; 271if (_selection is not null) 288_selection.Clear(); 305int ISelectionService.SelectionCount => _selection?.Count ?? 0; 333return _selection is not null && _selection.Contains(component); 343return _selection?.ToArray() ?? []; 399if (requestedPrimary is not null && _selection is not null && (primaryIndex = _selection.IndexOf(requestedPrimary)) != -1) 403(_selection[primaryIndex], _selection[0]) = (_selection[0], _selection[primaryIndex]); 414if (_selection is not null) 416IComponent[] selections = new IComponent[_selection.Count]; 417_selection.CopyTo(selections, 0); 447if (_selection is not null && _selection.Contains(comp)) 467if (_selection?.Count > 0) 469_statusCommandUI.SetStatusInformation(_selection[0] as Component);