/// <summary> /// Makes the filter aware of the <see cref="IRoutedMessageHandler"/>. /// </summary> /// <param name="messageHandler">The message handler.</param> public void MakeAwareOf(IRoutedMessageHandler messageHandler) { var notifier = messageHandler.Unwrap() as INotifyPropertyChanged; if (notifier == null) return; var helper = messageHandler.GetMetadata<ItemDependencyObserver>(); if (helper != null) return; helper = new ItemDependencyObserver(messageHandler, _methodFactory, notifier); messageHandler.AddMetadata(helper); }
/// <summary> /// Makes the filter aware of the <see cref="IRoutedMessageHandler"/>. /// </summary> /// <param name="messageHandler">The message handler.</param> public void MakeAwareOf(IRoutedMessageHandler messageHandler) { var notifier = messageHandler.Unwrap() as INotifyPropertyChanged; if (notifier == null) { return; } var helper = messageHandler.GetMetadata <ItemDependencyObserver>(); if (helper != null) { return; } helper = new ItemDependencyObserver(messageHandler, _methodFactory, notifier); messageHandler.AddMetadata(helper); }