protected override void DoUnsubscribeForValueChange(object target) { if (notifyValueChanged != null) { notifyValueChanged.UnregisterValueChangedCallback(OnValueChanged); } }
public static IObservable <ChangeEvent <T> > OnValueChange <T>(this INotifyValueChanged <T> source) { return(Observable.FromEvent <EventCallback <ChangeEvent <T> >, ChangeEvent <T> >( h => new EventCallback <ChangeEvent <T> >(h), h => source.RegisterValueChangedCallback(h), h => source.UnregisterValueChangedCallback(h))); }