private void _subscribeOriginalCollectionAllEvents(BaseViewModelCollection <TViewModel> collection, bool addEvents) { if (collection != null) { if (addEvents) { collection.CollectionChanged += _originalCollectionOnCollectionChanged; } else { collection.CollectionChanged -= _originalCollectionOnCollectionChanged; } } }
protected override void UpdatedOriginalCollection(BaseViewModelCollection <TViewModel> collection) { base.UpdatedOriginalCollection(collection); _subscribeOriginalCollectionAllEvents(collection, true); }