Ejemplo n.º 1
0
        public TargetWhenSetter(
            Notifyable targetNotifyable,
            INotifyPropertyChanged sourceNotifyable,
            params string[] sourcePropertyNames)
        {
            this.targetNotifyable    = targetNotifyable;
            this.sourcePropertyNames = sourcePropertyNames;

            sourcePropertyNames.ForEach(
                propertyName => PropertyChangedEventManager.AddHandler(
                    sourceNotifyable, PropertyChangedEventHandler, propertyName));
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public Property(string propertyName, Notifyable notifyable)
 {
     this.propertyName = propertyName;
     this.notifyable   = notifyable;
 }
Ejemplo n.º 4
0
 public void NotifyAll(Notifyable target)
 {
     targetNotifyable = target;
     isNotifyAll      = true;
 }
Ejemplo n.º 5
0
 public void Notify(Notifyable target, params string[] propertyNames)
 {
     targetNotifyable    = target;
     targetPropertyNames = propertyNames;
 }