ReactiveNotifyPropertyChangedMixin.

ObservableForProperty<TSender, TValue>(TSender, Expression<Func<TSender, TValue>>, bool, bool) Method

Summary

ObservableForProperty returns an Observable representing the property change notifications for a specific property on a ReactiveObject. This method (unlike other Observables that return IObservedChange) guarantees that the Value property of the IObservedChange is set.

Syntax

public static IObservable<IObservedChange<TSender, TValue>> ObservableForProperty<TSender, TValue>(this TSender item, Expression<Func<TSender, TValue>> property, bool beforeChange = false, bool skipInitial = true)

Type Parameters

Name Description
TSender The sender type.
TValue The value type.

Parameters

Name Type Description
item TSender The source object to observe properties of.
property Expression<Func<TSender, TValue>> An Expression representing the property (i.e. 'x => x.SomeProperty.SomeOtherProperty'.
beforeChange bool If True, the Observable will notify immediately before a property is going to change.
skipInitial bool If true, the Observable will not notify with the initial value.

Return Value

Type Description
IObservable<IObservedChange<TSender, TValue>> An Observable representing the property change notifications for the given property.