/// <summary> /// Initializes a new instance of the <see cref="NotifyRangedListChangedEventArgs"/> class. /// </summary> /// <param name="action">The real action that was performed on the <see cref="FastBindingList{T}"/>.</param> public NotifyRangedListChangedEventArgs(NotifyRangedListChangedAction action) : base(ListChangedType.Reset, -1) { Action = action; NewStartingIndex = -1; OldStartingIndex = -1; }
/// <summary> /// Initializes a new instance of the <see cref="NotifyRangedListChangedEventArgs"/> class. /// </summary> /// <param name="action">The real action that was performed on the <see cref="FastBindingList{T}"/>.</param> /// <param name="changedItems">The changed items.</param> /// <param name="indices">The indices.</param> public NotifyRangedListChangedEventArgs(NotifyRangedListChangedAction action, IList changedItems, IList<int> indices) : base(ListChangedType.Reset, -1) { Action = action; NewItems = changedItems; NewStartingIndex = (indices != null && indices.Count != 0) ? indices[0] : -1; OldStartingIndex = -1; Indices = indices; }
/// <summary> /// Initializes a new instance of the <see cref="NotifyRangedListChangedEventArgs"/> class. /// </summary> /// <param name="action">The real action that was performed on the <see cref="FastBindingList{T}"/>.</param> /// <param name="changedItems">The changed items.</param> /// <param name="indices">The indices.</param> public NotifyRangedListChangedEventArgs(NotifyRangedListChangedAction action, IList changedItems, IList <int> indices) : base(ListChangedType.Reset, -1) { Action = action; NewItems = changedItems; NewStartingIndex = (indices != null && indices.Count != 0) ? indices[0] : -1; OldStartingIndex = -1; Indices = indices; }
/// <summary> /// Initializes a new instance of the <see cref="NotifyRangedListChangedEventArgs"/> class. /// </summary> /// <param name="action">The real action that was performed on the <see cref="FastBindingList{T}"/>.</param> /// <param name="changedItems">The changed items.</param> /// <param name="indices">The indices.</param> public NotifyRangedListChangedEventArgs(NotifyRangedListChangedAction action, IList changedItems, IList <int> indices) : base(ListChangedType.Reset, -1) { Action = action; var startingIndex = indices != null && indices.Count != 0 ? indices[0] : -1; if (action == NotifyRangedListChangedAction.Add) { NewItems = changedItems; NewStartingIndex = startingIndex; OldStartingIndex = -1; } else { OldItems = changedItems; OldStartingIndex = startingIndex; NewStartingIndex = -1; } Indices = indices; }