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