示例#1
0
        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);
        }
示例#2
0
		protected override void Dispose(bool disposing)
		{
			if (_list != _empty)
			{
				_list.ListChanged -= ListChangedHandler;

				if (_disposeList || (_isListCreatedInternally && _disposeCreatedList))
					_list.Dispose();
			}

			_list = _empty;
			
			base.Dispose(disposing);
		}
示例#3
0
 public EditableArrayList(Type itemType, EditableArrayList list, bool trackChanges)
     : this(itemType, new ArrayList(list), trackChanges)
 {
 }
示例#4
0
 public EditableArrayList(Type itemType, EditableArrayList list)
     : this(itemType, new ArrayList(list), true)
 {
 }
示例#5
0
 public EditableArrayList(EditableArrayList list)
     : this(list.ItemType, new ArrayList(list), true)
 {
 }
		public EditableArrayList(Type itemType, EditableArrayList list, bool trackChanges)
			: this(itemType, new ArrayList(list), trackChanges)
		{
		}
示例#7
0
 public BindingListImplInternal(IList list, Type itemType, EditableArrayList owner)
     : base(list, itemType)
 {
     _owner = owner;
 }
			public BindingListImplInternal(IList list, Type itemType, EditableArrayList owner)
				: base(list, itemType)
			{
				_owner = owner;
			}
		public EditableArrayList(Type itemType, EditableArrayList list)
			: this(itemType, new ArrayList(list), true)
		{
		}
示例#10
0
		public EditableArrayList(EditableArrayList list)
			: this(list.ItemType, new ArrayList(list), true)
		{
		}
示例#11
0
		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;
		}
示例#12
0
			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);
				}
			}