private void HookSubpathMonitor() { if (_subPathMonitor != null) _subPathMonitor.Dispose(); if (string.IsNullOrEmpty(_subPath)) return; var getter = GetPropertyGetMethod(); var subTarget = getter.Invoke(GetTargetOrFail()) as INotifyPropertyChanged; if (subTarget != null) _subPathMonitor = new PropertyPathMonitor(_methodFactory, subTarget, _subPath, Notify); }
private void HookSubpathMonitor() { if (_subPathMonitor != null) { _subPathMonitor.Dispose(); } if (string.IsNullOrEmpty(_subPath)) { return; } var getter = GetPropertyGetMethod(); var subTarget = getter.Invoke(GetTargetOrFail()) as INotifyPropertyChanged; if (subTarget != null) { _subPathMonitor = new PropertyPathMonitor(_methodFactory, subTarget, _subPath, Notify); } }
void HookSubpathMonitor() { if (subPathMonitor != null) { subPathMonitor.Dispose(); } if (string.IsNullOrEmpty(subPath)) { return; } var getter = GetPropertyGetMethod(); var subTarget = getter.Invoke(GetNotifier(true)) as INotifyPropertyChanged; if (subTarget != null) { subPathMonitor = new PropertyPathMonitor(methodFactory, subTarget, subPath, this); } }
public SinglePropertyPathObserver(IRoutedMessageHandler messageHandler, IMethodFactory methodFactory, INotifyPropertyChanged notifier, string propertyPath) { _messageHandler = messageHandler; _monitor = new PropertyPathMonitor(methodFactory, notifier, propertyPath, this); }
/// <summary> /// Initializes a new instance of the <see cref="SinglePropertyPathObserver"/> class. /// </summary> /// <param name="messageHandler">The message handler.</param> /// <param name="methodFactory">The method factory.</param> /// <param name="notifier">The notifier.</param> /// <param name="propertyPath">The property path.</param> public SinglePropertyPathObserver(IRoutedMessageHandler messageHandler, IMethodFactory methodFactory, INotifyPropertyChanged notifier, string propertyPath) { this.messageHandler = messageHandler; monitor = new PropertyPathMonitor(methodFactory, notifier, propertyPath, this); }