The recording of the first ever ReactiveUI virtual conference is available on our YouTube Channel.

WhenAnyMixin.

WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(TSender, Expression<Func<TSender, T1>>, Expression<Func<TSender, T2>>, Expression<Func<TSender, T3>>, Expression<Func<TSender, T4>>, Expression<Func<TSender, T5>>, Expression<Func<TSender, T6>>, Expression<Func<TSender, T7>>, Expression<Func<TSender, T8>>, Expression<Func<TSender, T9>>, Expression<Func<TSender, T10>>, Expression<Func<TSender, T11>>, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, TRet>) Method

Summary

WhenAny allows you to observe whenever 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.
Namespace
ReactiveUI
Containing Type
WhenAnyMixin

Syntax

public static IObservable<TRet> WhenAny<TSender, TRet, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>(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, Expression<Func<TSender, T10>> property10, Expression<Func<TSender, T11>> property11, Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, TRet> selector)

Type Parameters

Name Description
TSender
TRet
T1
T2
T3
T4
T5
T6
T7
T8
T9
T10
T11

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.
property10 Expression<Func<TSender, T10>> The 10 property chain to reference. This will be a expression pointing to a end property or field.
property11 Expression<Func<TSender, T11>> The 11 property chain to reference. This will be a expression pointing to a end property or field.
selector Func<IObservedChange<TSender, T1>, IObservedChange<TSender, T2>, IObservedChange<TSender, T3>, IObservedChange<TSender, T4>, IObservedChange<TSender, T5>, IObservedChange<TSender, T6>, IObservedChange<TSender, T7>, IObservedChange<TSender, T8>, IObservedChange<TSender, T9>, IObservedChange<TSender, T10>, IObservedChange<TSender, T11>, TRet> The selector which will determine the final value from the properties.

Return Value

Type Description
IObservable<TRet>