public TargetWhenSetter( Notifyable targetNotifyable, INotifyPropertyChanged sourceNotifyable, params string[] sourcePropertyNames) { this.targetNotifyable = targetNotifyable; this.sourcePropertyNames = sourcePropertyNames; sourcePropertyNames.ForEach( propertyName => PropertyChangedEventManager.AddHandler( sourceNotifyable, PropertyChangedEventHandler, propertyName)); }
protected TargetWhenSetter WhenSet( Notifyable sourceNotifyable, params string[] sourcePropertyName) { if (targetWhenSetters == null) { targetWhenSetters = new List <TargetWhenSetter>(); } TargetWhenSetter whenSetter = new TargetWhenSetter(this, sourceNotifyable, sourcePropertyName); targetWhenSetters.Add(whenSetter); return(whenSetter); }
public Property(string propertyName, Notifyable notifyable) { this.propertyName = propertyName; this.notifyable = notifyable; }
public void NotifyAll(Notifyable target) { targetNotifyable = target; isNotifyAll = true; }
public void Notify(Notifyable target, params string[] propertyNames) { targetNotifyable = target; targetPropertyNames = propertyNames; }