74 references to List
System.Windows.Forms (55)
System\Windows\Forms\DataBinding\BindingSource.cs (55)
122
return ((IBindingList)
List
).AllowNew;
132
return !
List
.IsReadOnly && !
List
.IsFixedSize && (!checkConstructor || _itemConstructor is not null);
253
if (
List
is IBindingListView iblv && iblv.SupportsFiltering)
274
if (
List
is IBindingListView iblv && iblv.SupportsFiltering)
287
if (
List
is IBindingListView iblv && iblv.SupportsAdvancedSorting)
291
else if (
List
is IBindingList ibl && ibl.SupportsSorting && ibl.IsSorted)
313
if (
List
is IBindingListView iblv && iblv.SupportsAdvancedSorting)
327
if (
List
is IBindingList ibl && ibl.SupportsSorting)
1183
_itemType = ListBindingHelper.GetListItemType(
List
);
1184
_itemShape = ListBindingHelper.GetListItemProperties(
List
);
1421
public virtual IEnumerator GetEnumerator() =>
List
.GetEnumerator();
1423
public virtual void CopyTo(Array arr, int index) =>
List
.CopyTo(arr, index);
1444
return
List
.Count;
1454
public virtual bool IsSynchronized =>
List
.IsSynchronized;
1457
public virtual object SyncRoot =>
List
.SyncRoot;
1465
if (_dataSource is null &&
List
.Count == 0)
1482
ret =
List
.Add(value);
1490
List
.Clear();
1494
public virtual bool Contains(object? value) =>
List
.Contains(value);
1496
public virtual int IndexOf(object? value) =>
List
.IndexOf(value);
1500
List
.Insert(index, value);
1507
List
.Remove(value);
1517
List
.RemoveAt(index);
1524
get =>
List
[index];
1527
List
[index] = value;
1537
public virtual bool IsFixedSize =>
List
.IsFixedSize;
1540
public virtual bool IsReadOnly =>
List
.IsReadOnly;
1543
ListBindingHelper.GetListName(
List
, listAccessors);
1555
return ListBindingHelper.GetListItemProperties(
List
, listAccessors);
1588
int oldCount =
List
.Count;
1600
addNewItem = ((IBindingList)
List
).AddNew();
1617
if (
List
.Count > oldCount)
1636
get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)
List
).AllowEdit : !
List
.IsReadOnly;
1672
get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)
List
).AllowRemove : !
List
.IsReadOnly && !
List
.IsFixedSize;
1681
get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)
List
).SupportsSearching;
1687
get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)
List
).SupportsSorting;
1693
get => _state.HasFlag(BindingSourceStates.IsBindingList) && ((IBindingList)
List
).IsSorted;
1700
get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)
List
).SortProperty : null;
1707
get => _state.HasFlag(BindingSourceStates.IsBindingList) ? ((IBindingList)
List
).SortDirection : ListSortDirection.Ascending;
1717
((IBindingList)
List
).AddIndex(property);
1728
((IBindingList)
List
).ApplySort(property, sort);
1738
return ((IBindingList)
List
).Find(prop, key);
1748
((IBindingList)
List
).RemoveIndex(prop);
1757
((IBindingList)
List
).RemoveSort();
1764
if (
List
is not IBindingListView iblv)
1776
get =>
List
is IBindingListView iblv
1800
if (
List
is IBindingListView iblv)
1809
get =>
List
is IBindingListView iblv && iblv.SupportsAdvancedSorting;
1815
get =>
List
is IBindingListView iblv && iblv.SupportsFiltering;
1827
if (
List
is ICancelAddNew iCancel)
1842
if (
List
is ICancelAddNew iCancel)
System.Windows.Forms.Design (1)
System\Windows\Forms\Design\DesignBindingPicker.cs (1)
737
dataSource = bindingSource.
List
;
System.Windows.Forms.Tests (18)
System\Windows\Forms\BindingSourceTests.cs (18)
42
Assert.Empty(source.
List
);
43
Assert.IsType<BindingList<object>>(source.
List
);
55
Assert.Same(source.
List
.SyncRoot, source.SyncRoot);
101
Assert.Empty(source.
List
);
102
Assert.IsType(expectedType, source.
List
);
114
Assert.Same(source.
List
.SyncRoot, source.SyncRoot);
166
Assert.Same(expected, source.
List
);
178
Assert.Same(source.
List
.SyncRoot, source.SyncRoot);
252
Assert.Same(expected, source.
List
);
264
Assert.Same(source.
List
.SyncRoot, source.SyncRoot);
322
Assert.Equal(expected, source.
List
);
323
Assert.NotSame(expected, source.
List
);
324
Assert.IsType(expectedType, source.
List
);
336
Assert.Same(source.
List
.SyncRoot, source.SyncRoot);
431
Assert.Same(mockList.Object, source.
List
);
505
Assert.Empty(source.
List
);
506
Assert.IsType<BindingList<object>>(source.
List
);
518
Assert.Same(source.
List
.SyncRoot, source.SyncRoot);