Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save no-longer-on-githu-b/d8e985272b37af3e6dba to your computer and use it in GitHub Desktop.
Save no-longer-on-githu-b/d8e985272b37af3e6dba to your computer and use it in GitHub Desktop.
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