Summary
WhenAnyValue allows you to observe whenever the value of one or more
properties on an object have changed, providing an initial value when
the Observable is set up, unlike ObservableForProperty(). Use this
method in constructors to set up bindings between properties that also
need an initial setup.
Syntax
public static IObservable<TRet> WhenAnyValue<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9>(this TSender sender, Expression<Func<TSender, T1>> property1, Expression<Func<TSender, T2>> property2, Expression<Func<TSender, T3>> property3, Expression<Func<TSender, T4>> property4, Expression<Func<TSender, T5>> property5, Expression<Func<TSender, T6>> property6, Expression<Func<TSender, T7>> property7, Expression<Func<TSender, T8>> property8, Expression<Func<TSender, T9>> property9, Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet> selector)
Type Parameters
Name |
Description |
TSender |
|
TRet |
|
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
T8 |
|
T9 |
|
Parameters
Name |
Type |
Description |
sender |
TSender |
The object where the property chain starts. |
property1 |
Expression<Func<TSender, T1>> |
The 1 property chain to reference. This will be a expression pointing to a end property or field. |
property2 |
Expression<Func<TSender, T2>> |
The 2 property chain to reference. This will be a expression pointing to a end property or field. |
property3 |
Expression<Func<TSender, T3>> |
The 3 property chain to reference. This will be a expression pointing to a end property or field. |
property4 |
Expression<Func<TSender, T4>> |
The 4 property chain to reference. This will be a expression pointing to a end property or field. |
property5 |
Expression<Func<TSender, T5>> |
The 5 property chain to reference. This will be a expression pointing to a end property or field. |
property6 |
Expression<Func<TSender, T6>> |
The 6 property chain to reference. This will be a expression pointing to a end property or field. |
property7 |
Expression<Func<TSender, T7>> |
The 7 property chain to reference. This will be a expression pointing to a end property or field. |
property8 |
Expression<Func<TSender, T8>> |
The 8 property chain to reference. This will be a expression pointing to a end property or field. |
property9 |
Expression<Func<TSender, T9>> |
The 9 property chain to reference. This will be a expression pointing to a end property or field. |
selector |
Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, TRet> |
The selector which will determine the final value from the properties. |
Return Value
Type |
Description |
IObservable<TRet> |
|