public Silenter(IEntityUpdater <T> listenerRegister, object target) { _ListenerRegister = listenerRegister; _Target = target as T; if (_Target != null) { _ListenerRegister.OnExit(_Target); } }
public void Dispose() { if (_Target == null) { return; } _Target.PropertyChanged -= TargetPropertyChanged; _ListenerRegister.OnExit(this); _ListenerRegister.OnEnter(_Target); _Target = null; }
public PropertyChangedSilenter(IEntityUpdater <INotifyPropertyChanged> listenerRegister, object target, string propertyName) { _ListenerRegister = listenerRegister; _PropertyName = propertyName; _Target = target as INotifyPropertyChanged; if (_Target == null) { return; } _Target.PropertyChanged += TargetPropertyChanged; _ListenerRegister.OnExit(_Target); _ListenerRegister.OnEnter(this); }