public static IDisposable ConnectINPCProperty <T>(this ObservableProperty <T> observableProperty, INotifyPropertyChangedEx viewModel, Expression <Func <T> > propertyExpression, IDispatcherSchedulerProvider scheduler) { var propertyName = PropertyExtensions.ExtractPropertyName(propertyExpression); return(observableProperty.ValueChanged .ObserveOn(scheduler.Dispatcher.RX) .Subscribe(x => viewModel.ConnectINPC(propertyName))); }
/// <summary> /// Raises this object's PropertyChanged event. /// /// </summary> /// <typeparam name="T">The type of the property that has a new value</typeparam> /// <param name="propertyExpression">A Lambda expression representing the property that has a new value.</param> protected void RaisePropertyChanged <T>(Expression <Func <T> > propertyExpression) { RaisePropertyChanged(PropertyExtensions.ExtractPropertyName(propertyExpression)); }