private PropertyChangeSubscriber Subscribe(PathItem <T> pathItem, object trackedObject) { if (pathItem == null || trackedObject == null) { return(null); } var subscriber = new PropertyChangeSubscriber(trackedObject, pathItem, OnPropertyChanged); subscriber.Ancestor = Subscribe(pathItem.Ancestor, pathItem.PropertyGetter(trackedObject)); return(subscriber); }
public MyExampleClass(PropertyChangePublisherBase publisher) { Id = new PropertyChangeSubscriber <string>("Id", publisher); TestBool = new PropertyChangeSubscriber <bool>("TestBool", publisher); }
private void OnPropertyChanged([NotNull] PropertyChangeSubscriber subscriber) { subscriber.Ancestor = Subscribe(subscriber.PathItem.Ancestor, subscriber.PathItem.PropertyGetter(subscriber.EffectiveObject)); ProvokeDependentPropertiesUpdate(subscriber.PathItem); }