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