#if (NET20 || NET35)
namespace System.Collections.Specialized
{
///
/// Stub
///
public interface INotifyCollectionChanged
{
///
/// Stub
///
event NotifyCollectionChangedEventHandler CollectionChanged;
}
///
/// Stub
///
/// The sender.
/// The instance containing the event data.
public delegate void NotifyCollectionChangedEventHandler(object sender, NotifyCollectionChangedEventArgs e);
///
/// Stub
///
public class NotifyCollectionChangedEventArgs : EventArgs
{
///
/// Initializes a new instance of the class.
///
/// The action.
/// The new items.
/// The old items.
/// The new index.
/// The old index.
internal NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, IList newItems, IList oldItems, int newIndex, int oldIndex)
{
Action = action;
NewItems = newItems;
NewStartingIndex = newIndex;
OldItems = oldItems;
OldStartingIndex = oldIndex;
}
///
/// Initializes a new instance of the class.
///
/// The action.
public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action) :
this(action, null, null, -1, -1) { }
///
/// Initializes a new instance of the class.
///
/// The action.
/// The item.
/// The index.
public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, object item, int idx = -1) :
this(action, new object[] { item }, null, idx, -1) { }
///
/// Initializes a new instance of the class.
///
/// The action.
/// The item.
/// The item2.
/// The index.
public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, object item, object item2, int idx) :
this(action, new object[] { item }, new object[] { item2 }, idx, -1) { }
///
/// Initializes a new instance of the class.
///
/// The action.
/// The new items.
public NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction action, IList newItems) :
this(action, newItems, null, -1, -1) { }
///
/// Gets the action.
///
///
/// The action.
///
public NotifyCollectionChangedAction Action { get; }
///
/// Gets the new items.
///
///
/// The new items.
///
public IList NewItems { get; }
///
/// Gets the new index of the starting.
///
///
/// The new index of the starting.
///
public int NewStartingIndex { get; }
///
/// Gets the old items.
///
///
/// The old items.
///
public IList OldItems { get; }
///
/// Gets the old index of the starting.
///
///
/// The old index of the starting.
///
public int OldStartingIndex { get; }
}
///
/// Stub
///
public enum NotifyCollectionChangedAction
{
///
/// The add
///
Add = 0,
///
/// The move
///
Move = 3,
///
/// The remove
///
Remove = 1,
///
/// The replace
///
Replace = 2,
///
/// The reset
///
Reset = 4
}
}
#endif