public virtual void Subscribe(INotifyPropertyChange changed) { changed.PropertyChanged -= FirePropertyChanged; changed.PropertyChanged += FirePropertyChanged; changed.PropertyChanging -= FirePropertyChanging; changed.PropertyChanging += FirePropertyChanging; }
private static void LogUnsubscribtions(object item, INotifyCollectionChange notifyCollectionChange, INotifyPropertyChange notifyPropertyChange) { if (!EventSettings.EnableLogging) return; if (notifyPropertyChange != null) log.DebugFormat("Unsubscribed Disconnected from property changes of: {0} ({1})", item, item.GetType().Name); if (notifyCollectionChange != null) log.DebugFormat("Unsubscribed Disconnected from collection changes of: {0} ({1})", item, item.GetType().Name); }
public virtual void Unsubscribe(INotifyPropertyChange change) { change.PropertyChanged -= FirePropertyChanged; change.PropertyChanging -= FirePropertyChanging; }
private static void LogSubscriptions(object item, INotifyCollectionChange notifyCollectionChange, INotifyPropertyChange notifyPropertyChange, bool newItem) { if (!EventSettings.EnableLogging) return; if (!newItem) { log.DebugFormat("Tried to subscribe disconnected, but was already subscribed as such: {0} ({1})", item, item.GetType().Name); return; } if (notifyPropertyChange != null) { log.DebugFormat("Subscribed Disconnected to property changes of: {0} ({1})", item, item.GetType().Name); } if (notifyCollectionChange != null) { log.DebugFormat("Subscribed Disconnected to collection changes of: {0} ({1})", item, item.GetType().Name); } }