3 writes to _savedSelectedItems
System.Windows.Forms (3)
System\Windows\Forms\Controls\ListView\ListView.cs (2)
2363
_savedSelectedItems
??= [];
4678
_savedSelectedItems
= new List<ListViewItem>(lviArr.Length);
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (1)
285
_owner.
_savedSelectedItems
= null;
21 references to _savedSelectedItems
System.Windows.Forms (21)
System\Windows\Forms\Controls\ListView\ListView.cs (6)
2365
if (!
_savedSelectedItems
.Contains(lvi))
2367
_savedSelectedItems
.Add(lvi);
2372
if (
_savedSelectedItems
is not null &&
_savedSelectedItems
.Contains(lvi))
2374
_savedSelectedItems
.Remove(lvi);
4681
_savedSelectedItems
.Add(lviArr[i]);
System\Windows\Forms\Controls\ListView\ListView.SelectedIndexCollection.cs (7)
36
if (_owner.
_savedSelectedItems
is not null)
38
return _owner.
_savedSelectedItems
.Count;
76
Debug.Assert(_owner.
_savedSelectedItems
is not null || count == 0, "if the count of selectedItems is greater than 0 then the selectedItems should have been saved by now");
77
if (_owner.
_savedSelectedItems
is not null)
81
indices[i] = _owner.
_savedSelectedItems
[i].Index;
118
Debug.Assert(_owner.
_savedSelectedItems
is not null, "Null selected items collection");
119
return _owner.
_savedSelectedItems
[index].Index;
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (8)
62
if (_owner.
_savedSelectedItems
is not null)
64
ListViewItem[] cloned = new ListViewItem[_owner.
_savedSelectedItems
.Count];
65
for (int i = 0; i < _owner.
_savedSelectedItems
.Count; i++)
67
cloned[i] = _owner.
_savedSelectedItems
[i];
99
if (_owner.
_savedSelectedItems
is not null)
101
return _owner.
_savedSelectedItems
.Count;
143
Debug.Assert(_owner.
_savedSelectedItems
is not null, "Null selected items collection");
144
return _owner.
_savedSelectedItems
[index];