Exemplo n.º 1
0
 public PropertyChangeSubscriber(string propertyName, PropertyChangePublisherBase bindingPublisher)
     : base(propertyName, bindingPublisher)
 {
     _publisher = bindingPublisher;
 }
 public static void AddBinding(string propertyName, PropertyChangeSubscriberBase subscriber, PropertyChangePublisherBase publisher)
 {
     if (!_bindingNames.Contains(propertyName))
     {
         int i = _subscribers.Count;
         _bindingNames.Add(propertyName);
         _publishers.Add(publisher);
         _subscribers.Add(subscriber);
         if (!publisher.ContainsBinding(PropertyChanged))
         {
             publisher.PropertyChanged += PropertyChanged;
         }
     }
 }
 protected PropertyChangeSubscriberBase(string propertyName, PropertyChangePublisherBase bindingPublisher)
 {
     _propertyName = propertyName;
     AddBinding(propertyName, this, bindingPublisher);
 }
 public MyExampleClass(PropertyChangePublisherBase publisher)
 {
     Id       = new PropertyChangeSubscriber <string>("Id", publisher);
     TestBool = new PropertyChangeSubscriber <bool>("TestBool", publisher);
 }