50 references to List
System.Windows.Forms (33)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (22)
88return CurrencyManager is { List: IBindingList { SupportsChangeNotification: true }, AllowAdd: true }; 99return CurrencyManager is { AllowRemove: true, List: IBindingList { SupportsChangeNotification: true } }; 120public IList? List => CurrencyManager?.List; 302if (CurrencyManager?.List is not IBindingList { SupportsSorting: true, IsSorted: true }) 341Debug.Assert(DataBoundRowsCount() == CurrencyManager!.List!.Count || (_owner.Columns.Count == 0 && dataGridViewRowsCount == 0), 474Debug.Assert(CurrencyManager?.List is not null); 475if (_dataConnectionState[DATACONNECTIONSTATE_inDeleteOperation] && CurrencyManager.List.Count == 0) 492Debug.Assert(CurrencyManager?.List is not null); 494&& CurrencyManager.List.Count == (_owner.AllowUserToAddRowsInternal ? _owner.Rows.Count - 1 : _owner.Rows.Count)) 508Debug.Assert(CurrencyManager.List.Count == 1); 529Debug.Assert(CurrencyManager!.List!.Count == 0, "we deleted the row that the Child table forcefully added"); 551Debug.Assert(CurrencyManager?.List is not null); 552if (CurrencyManager.List.Count == DataBoundRowsCount()) 736Debug.Assert(CurrencyManager?.List is not null); 737if (CurrencyManager.List is IBindingList ibl && ibl.SupportsSorting && ibl.IsSorted) 828Debug.Assert(CurrencyManager?.List is not null); 829if (_owner.NewRowIndex == CurrencyManager.List.Count) 837Debug.Assert(_owner.NewRowIndex == CurrencyManager.List.Count - 1); 974if (CurrencyManager?.List is not IBindingList { SupportsSorting: true, IsSorted: true } ibl) 1291if (CurrencyManager!.Position >= 0 && CurrencyManager.Position < CurrencyManager.List!.Count) 1304if (CurrencyManager.Position >= 0 && CurrencyManager.Position < CurrencyManager.List!.Count) 1394Debug.Assert(DataBoundRowsCount() == CurrencyManager.List!.Count, "if the back end was changed while in AddNew the DGV should have updated its rows collection");
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
19973int rowCount = DataConnection!.CurrencyManager?.List.Count ?? 0;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
1419if ((DataManager.List is IBindingList bindingList) && bindingList.SupportsSearching) 1424item = DataManager.List[index]; 1430for (int i = 0; i < DataManager.List.Count; i++) 1432object? itemTmp = DataManager.List[i];
System\Windows\Forms\Controls\ListControl\ListControl.cs (3)
411SetItemsCore(_dataManager.List); 686IList? currentList = DataManager?.List; 745if (displayMemberChanged || (force && (currentList != _dataManager.List || currentManagerIsNull)))
System\Windows\Forms\DataBinding\BindingManagerBase.cs (1)
81list = currencyManager.List;
System\Windows\Forms\DataBinding\CurrencyManager.cs (2)
134internal override Type BindType => ListBindingHelper.GetListItemType(List); 1052if (e.NewIndex <= _lastGoodKnownRow && _lastGoodKnownRow < List.Count - 1)
System.Windows.Forms.Tests (17)
System\Windows\Forms\BindingContextTests.cs (10)
422Assert.Same(dataSource, manager.List); 436Assert.Same(dataSource, manager.List); 455Assert.Same(dataSource, manager.List); 582Assert.Same(list, manager.List); 619Assert.Same(list, manager.List); 641Assert.Same(list, manager.List); 825Assert.Same(dataSource, manager.List); 863Assert.Same(list, manager.List); 920Assert.Same(dataSource, manager1.List); 927Assert.Same(dataSource, manager2.List);
System\Windows\Forms\BindingSourceTests.cs (7)
29Assert.Same(source, source.CurrencyManager.List); 88Assert.Same(source, source.CurrencyManager.List); 153Assert.Same(source, source.CurrencyManager.List); 239Assert.Same(source, source.CurrencyManager.List); 309Assert.Same(source, source.CurrencyManager.List); 418Assert.Same(source, source.CurrencyManager.List); 492Assert.Same(source, source.CurrencyManager.List);