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)
2365if (!_savedSelectedItems.Contains(lvi)) 2367_savedSelectedItems.Add(lvi); 2372if (_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)
36if (_owner._savedSelectedItems is not null) 38return _owner._savedSelectedItems.Count; 76Debug.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"); 77if (_owner._savedSelectedItems is not null) 81indices[i] = _owner._savedSelectedItems[i].Index; 118Debug.Assert(_owner._savedSelectedItems is not null, "Null selected items collection"); 119return _owner._savedSelectedItems[index].Index;
System\Windows\Forms\Controls\ListView\ListView.SelectedListViewItemCollection.cs (8)
62if (_owner._savedSelectedItems is not null) 64ListViewItem[] cloned = new ListViewItem[_owner._savedSelectedItems.Count]; 65for (int i = 0; i < _owner._savedSelectedItems.Count; i++) 67cloned[i] = _owner._savedSelectedItems[i]; 99if (_owner._savedSelectedItems is not null) 101return _owner._savedSelectedItems.Count; 143Debug.Assert(_owner._savedSelectedItems is not null, "Null selected items collection"); 144return _owner._savedSelectedItems[index];