Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class NotifyCollectionsActions
- {
- public readonly INotifyCollectionChanged[] Collections;
- public readonly Action ChangedAction;
- public NotifyCollectionsActions(Action changedAction, params INotifyCollectionChanged[] collections)
- {
- this.Collections = collections;
- this.ChangedAction = changedAction;
- foreach (INotifyCollectionChanged collection in Collections)
- {
- collection.CollectionChanged += (s, e) =>
- {
- if (ChangedAction != null)
- ChangedAction();
- };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment