Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class NotifyCollectionChangedEventArgs<T>
{
private readonly NotifyCollectionChangedEventArgs _args;
public NotifyCollectionChangedEventArgs(NotifyCollectionChangedEventArgs args)
{
_args = args;
}
public IEnumerable<T> NewItems => _args.NewItems?.Cast<T>() ?? Enumerable.Empty<T>();
public int NewStartingIndex => _args.NewStartingIndex;
public IEnumerable<T> OldItems => _args.OldItems?.Cast<T>() ?? Enumerable.Empty<T>();
public int OldStartingIndex => _args.OldStartingIndex;
public NotifyCollectionChangedAction Action => _args.Action;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment