50 references to List
System.Windows.Forms (33)
System\Windows\Forms\Controls\DataGridView\DataGridView.DataConnection.cs (22)
88
return CurrencyManager is {
List
: IBindingList { SupportsChangeNotification: true }, AllowAdd: true };
99
return CurrencyManager is { AllowRemove: true,
List
: IBindingList { SupportsChangeNotification: true } };
120
public IList? List => CurrencyManager?.
List
;
302
if (CurrencyManager?.
List
is not IBindingList { SupportsSorting: true, IsSorted: true })
341
Debug.Assert(DataBoundRowsCount() == CurrencyManager!.
List
!.Count || (_owner.Columns.Count == 0 && dataGridViewRowsCount == 0),
474
Debug.Assert(CurrencyManager?.
List
is not null);
475
if (_dataConnectionState[DATACONNECTIONSTATE_inDeleteOperation] && CurrencyManager.
List
.Count == 0)
492
Debug.Assert(CurrencyManager?.
List
is not null);
494
&& CurrencyManager.
List
.Count == (_owner.AllowUserToAddRowsInternal ? _owner.Rows.Count - 1 : _owner.Rows.Count))
508
Debug.Assert(CurrencyManager.
List
.Count == 1);
529
Debug.Assert(CurrencyManager!.
List
!.Count == 0, "we deleted the row that the Child table forcefully added");
551
Debug.Assert(CurrencyManager?.
List
is not null);
552
if (CurrencyManager.
List
.Count == DataBoundRowsCount())
736
Debug.Assert(CurrencyManager?.
List
is not null);
737
if (CurrencyManager.
List
is IBindingList ibl && ibl.SupportsSorting && ibl.IsSorted)
828
Debug.Assert(CurrencyManager?.
List
is not null);
829
if (_owner.NewRowIndex == CurrencyManager.
List
.Count)
837
Debug.Assert(_owner.NewRowIndex == CurrencyManager.
List
.Count - 1);
974
if (CurrencyManager?.
List
is not IBindingList { SupportsSorting: true, IsSorted: true } ibl)
1291
if (CurrencyManager!.Position >= 0 && CurrencyManager.Position < CurrencyManager.
List
!.Count)
1304
if (CurrencyManager.Position >= 0 && CurrencyManager.Position < CurrencyManager.
List
!.Count)
1394
Debug.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)
19976
int rowCount = DataConnection!.CurrencyManager?.
List
.Count ?? 0;
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (4)
1419
if ((DataManager.
List
is IBindingList bindingList) && bindingList.SupportsSearching)
1424
item = DataManager.
List
[index];
1430
for (int i = 0; i < DataManager.
List
.Count; i++)
1432
object? itemTmp = DataManager.
List
[i];
System\Windows\Forms\Controls\ListControl\ListControl.cs (3)
411
SetItemsCore(_dataManager.
List
);
686
IList? currentList = DataManager?.
List
;
745
if (displayMemberChanged || (force && (currentList != _dataManager.
List
|| currentManagerIsNull)))
System\Windows\Forms\DataBinding\BindingManagerBase.cs (1)
81
list = currencyManager.
List
;
System\Windows\Forms\DataBinding\CurrencyManager.cs (2)
134
internal override Type BindType => ListBindingHelper.GetListItemType(
List
);
1052
if (e.NewIndex <= _lastGoodKnownRow && _lastGoodKnownRow <
List
.Count - 1)
System.Windows.Forms.Tests (17)
System\Windows\Forms\BindingContextTests.cs (10)
420
Assert.Same(dataSource, manager.
List
);
434
Assert.Same(dataSource, manager.
List
);
453
Assert.Same(dataSource, manager.
List
);
580
Assert.Same(list, manager.
List
);
617
Assert.Same(list, manager.
List
);
639
Assert.Same(list, manager.
List
);
823
Assert.Same(dataSource, manager.
List
);
861
Assert.Same(list, manager.
List
);
918
Assert.Same(dataSource, manager1.
List
);
925
Assert.Same(dataSource, manager2.
List
);
System\Windows\Forms\BindingSourceTests.cs (7)
27
Assert.Same(source, source.CurrencyManager.
List
);
86
Assert.Same(source, source.CurrencyManager.
List
);
151
Assert.Same(source, source.CurrencyManager.
List
);
237
Assert.Same(source, source.CurrencyManager.
List
);
307
Assert.Same(source, source.CurrencyManager.
List
);
416
Assert.Same(source, source.CurrencyManager.
List
);
490
Assert.Same(source, source.CurrencyManager.
List
);