protected EditableArrayList Clone(EditableArrayList el) { if (_newItems != null) { el._newItems = (ArrayList)_newItems.Clone(); } if (_delItems != null) { el._delItems = (ArrayList)_delItems.Clone(); } el.NotifyChanges = NotifyChanges; el._noTrackingChangesCount = _noTrackingChangesCount; return(el); }
protected override void Dispose(bool disposing) { if (_list != _empty) { _list.ListChanged -= ListChangedHandler; if (_disposeList || (_isListCreatedInternally && _disposeCreatedList)) _list.Dispose(); } _list = _empty; base.Dispose(disposing); }
public EditableArrayList(Type itemType, EditableArrayList list, bool trackChanges) : this(itemType, new ArrayList(list), trackChanges) { }
public EditableArrayList(Type itemType, EditableArrayList list) : this(itemType, new ArrayList(list), true) { }
public EditableArrayList(EditableArrayList list) : this(list.ItemType, new ArrayList(list), true) { }
public BindingListImplInternal(IList list, Type itemType, EditableArrayList owner) : base(list, itemType) { _owner = owner; }
protected EditableArrayList Clone(EditableArrayList el) { if (_newItems != null) el._newItems = (ArrayList)_newItems.Clone(); if (_delItems != null) el._delItems = (ArrayList)_delItems.Clone(); el.NotifyChanges = NotifyChanges; el._noTrackingChangesCount = _noTrackingChangesCount; return el; }
public IEnumerator GetEnumerator() { _arguments.AddSupportedCapabilities(DataSourceCapabilities.Page); _arguments.AddSupportedCapabilities(DataSourceCapabilities.Sort); _arguments.AddSupportedCapabilities(DataSourceCapabilities.RetrieveTotalRowCount); EditableArrayList list = (EditableArrayList)_objectBinder.List; _arguments.TotalRowCount = list.Count; if (!string.IsNullOrEmpty(_arguments.SortExpression)) { list = new EditableArrayList(list.ItemType, list.Count); list.AddRange(_objectBinder.List); list.SortEx(_arguments.SortExpression); } int start = _arguments.StartRowIndex >= 0? _arguments.StartRowIndex: 0; int count = _arguments.MaximumRows > 0? Math.Min(_arguments.MaximumRows, list.Count): list.Count; for (int i = 0; i < count; i++) { object o = list[i + start]; yield return o is ICustomTypeDescriptor? o: new ObjectHolder(o, _objectBinder); } }