},System.Func{--0,--2,--1},System.Func{--2})} },System.Linq.Expressions.Expression{System.Func{--0,--3}},System.Func{--0,--2,--3,--1},System.Func{--2},System.Func{--3})} },System.Linq.Expressions.Expression{System.Func{--0,--3}},System.Linq.Expressions.Expression{System.Func{--0,--4}},System.Func{--0,--2,--3,--4,--1},System.Func{--2},System.Func{--3},System.Func{--4})} },System.Linq.Expressions.Expression{System.Func{--0,--3}},System.Linq.Expressions.Expression{System.Func{--0,--4}},System.Linq.Expressions.Expression{System.Func{--0,--5}},System.Func{--0,--2,--3,--4,--5,--1},System.Func{--2},System.Func{--3},System.Func{--4},System.Func{--5})} },System.Linq.Expressions.Expression{System.Func{--0,--3}},System.Linq.Expressions.Expression{System.Func{--0,--4}},System.Linq.Expressions.Expression{System.Func{--0,--5}},System.Linq.Expressions.Expression{System.Func{--0,--6}},System.Func{--0,--2,--3,--4,--5,--6,--1},System.Func{--2},System.Func{--3},System.Func{--4},System.Func{--5},System.Func{--6})} },System.Linq.Expressions.Expression{System.Func{--0,--3}},System.Linq.Expressions.Expression{System.Func{--0,--4}},System.Linq.Expressions.Expression{System.Func{--0,--5}},System.Linq.Expressions.Expression{System.Func{--0,--6}},System.Linq.Expressions.Expression{System.Func{--0,--7}},System.Func{--0,--2,--3,--4,--5,--6,--7,--1},System.Func{--2},System.Func{--3},System.Func{--4},System.Func{--5},System.Func{--6},System.Func{--7})}
NotifyPropertyChangedEx.WhenChanged(TObject, Expression>, Func, Func?) method¶
Defined in
Type: NotifyPropertyChangedEx
Namespace: DynamicData.Binding
Assembly: DynamicData.dll
Applies to
net10.0, netstandard2.0
Overloads¶
-
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Func<TObject, TProperty1?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null) where TObject : INotifyPropertyChanged -
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Func<TObject, TProperty1?, TProperty2?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null) where TObject : INotifyPropertyChanged -
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null) where TObject : INotifyPropertyChanged -
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3, TProperty4>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Expression<Func<TObject, TProperty4>> p4, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TProperty4?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null, Func<TProperty4>? p4Fallback = null) where TObject : INotifyPropertyChanged -
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Expression<Func<TObject, TProperty4>> p4, Expression<Func<TObject, TProperty5>> p5, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TProperty4?, TProperty5?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null, Func<TProperty4>? p4Fallback = null, Func<TProperty5>? p5Fallback = null) where TObject : INotifyPropertyChanged -
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Expression<Func<TObject, TProperty4>> p4, Expression<Func<TObject, TProperty5>> p5, Expression<Func<TObject, TProperty6>> p6, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TProperty4?, TProperty5?, TProperty6?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null, Func<TProperty4>? p4Fallback = null, Func<TProperty5>? p5Fallback = null, Func<TProperty6>? p6Fallback = null) where TObject : INotifyPropertyChanged
1. Overload¶
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Func<TObject, TProperty1?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null) where TObject : INotifyPropertyChanged
Summary: Produces an observable based on the combined values of the specified properties, including the initial value. ** A fallback value may be specified to ensure a notification is received when a value is unobtainable. For example when observing Parent.Child.Age, if Child is null the value is unobtainable as Age is a struct and cannot be set to Null. For an object like Parent.Child.Sibling, sibling is an object so if Child is null, the value null and obtainable and is returned as null.
Type parameters
| Name | Description |
|---|---|
TObject | The type of the object. |
TResult | The type of the result. |
TProperty1 | The type of the first property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TObject | The source object. |
p1 | Expression | An expression to the first property. |
resultSelector | Func | A function which will select the result from the properties and the source. |
p1Fallback = null | Func | Provides a fall back value for the first property in case of the property value cannot be obtained. |
Returns: IObservable
2. Overload¶
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Func<TObject, TProperty1?, TProperty2?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null) where TObject : INotifyPropertyChanged
Summary: Produces an observable based on the combined values of the specified properties, including the initial value. ** A fallback value may be specified to ensure a notification is received when a value is unobtainable. For example when observing Parent.Child.Age, if Child is null the value is unobtainable as Age is a struct and cannot be set to Null. For an object like Parent.Child.Sibling, sibling is an object so if Child is null, the value null and obtainable and is returned as null.
Type parameters
| Name | Description |
|---|---|
TObject | The type of the object. |
TResult | The type of the result. |
TProperty1 | The type of the first property. |
TProperty2 | The type of the second property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TObject | The source object. |
p1 | Expression | An expression to the first property. |
p2 | Expression | An expression to the second property. |
resultSelector | Func | A function which will select the result from the properties and the source. |
p1Fallback = null | Func | Provides a fall back value for the first property in case of the property value cannot be obtained. |
p2Fallback = null | Func | Provides a fall back value for the second property in case of the property value cannot be obtained. |
Returns: IObservable
3. Overload¶
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null) where TObject : INotifyPropertyChanged
Summary: Produces an observable based on the combined values of the specified properties, including the initial value. ** A fallback value may be specified to ensure a notification is received when a value is unobtainable. For example when observing Parent.Child.Age, if Child is null the value is unobtainable as Age is a struct and cannot be set to Null. For an object like Parent.Child.Sibling, sibling is an object so if Child is null, the value null and obtainable and is returned as null.
Type parameters
| Name | Description |
|---|---|
TObject | The type of the object. |
TResult | The type of the result. |
TProperty1 | The type of the first property. |
TProperty2 | The type of the second property. |
TProperty3 | The type of the third property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TObject | The source object. |
p1 | Expression | An expression to the first property. |
p2 | Expression | An expression to the second property. |
p3 | Expression | An expression to the third property. |
resultSelector | Func | A function which will select the result from the properties and the source. |
p1Fallback = null | Func | Provides a fall back value for the first property in case of the property value cannot be obtained. |
p2Fallback = null | Func | Provides a fall back value for the second property in case of the property value cannot be obtained. |
p3Fallback = null | Func | Provides a fall back value for the third property in case of the property value cannot be obtained. |
Returns: IObservable
4. Overload¶
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3, TProperty4>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Expression<Func<TObject, TProperty4>> p4, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TProperty4?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null, Func<TProperty4>? p4Fallback = null) where TObject : INotifyPropertyChanged
Summary: Produces an observable based on the combined values of the specified properties, including the initial value. ** A fallback value may be specified to ensure a notification is received when a value is unobtainable. For example when observing Parent.Child.Age, if Child is null the value is unobtainable as Age is a struct and cannot be set to Null. For an object like Parent.Child.Sibling, sibling is an object so if Child is null, the value null and obtainable and is returned as null.
Type parameters
| Name | Description |
|---|---|
TObject | The type of the object. |
TResult | The type of the result. |
TProperty1 | The type of the first property. |
TProperty2 | The type of the second property. |
TProperty3 | The type of the third property. |
TProperty4 | The type of the fourth property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TObject | The source object. |
p1 | Expression | An expression to the first property. |
p2 | Expression | An expression to the second property. |
p3 | Expression | An expression to the third property. |
p4 | Expression | An expression to the fourth property. |
resultSelector | Func | A function which will select the result from the properties and the source. |
p1Fallback = null | Func | Provides a fall back value for the first property in case of the property value cannot be obtained. |
p2Fallback = null | Func | Provides a fall back value for the second property in case of the property value cannot be obtained. |
p3Fallback = null | Func | Provides a fall back value for the third property in case of the property value cannot be obtained. |
p4Fallback = null | Func | Provides a fall back value for the fourth property in case of the property value cannot be obtained. |
Returns: IObservable
5. Overload¶
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Expression<Func<TObject, TProperty4>> p4, Expression<Func<TObject, TProperty5>> p5, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TProperty4?, TProperty5?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null, Func<TProperty4>? p4Fallback = null, Func<TProperty5>? p5Fallback = null) where TObject : INotifyPropertyChanged
Summary: Produces an observable based on the combined values of the specified properties, including the initial value. ** A fallback value may be specified to ensure a notification is received when a value is unobtainable. For example when observing Parent.Child.Age, if Child is null the value is unobtainable as Age is a struct and cannot be set to Null. For an object like Parent.Child.Sibling, sibling is an object so if Child is null, the value null and obtainable and is returned as null.
Type parameters
| Name | Description |
|---|---|
TObject | The type of the object. |
TResult | The type of the result. |
TProperty1 | The type of the first property. |
TProperty2 | The type of the second property. |
TProperty3 | The type of the third property. |
TProperty4 | The type of the fourth property. |
TProperty5 | The type of the fifth property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TObject | The source object. |
p1 | Expression | An expression to the first property. |
p2 | Expression | An expression to the second property. |
p3 | Expression | An expression to the third property. |
p4 | Expression | An expression to the fourth property. |
p5 | Expression | An expression to the fifth property. |
resultSelector | Func | A function which will select the result from the properties and the source. |
p1Fallback = null | Func | Provides a fall back value for the first property in case of the property value cannot be obtained. |
p2Fallback = null | Func | Provides a fall back value for the second property in case of the property value cannot be obtained. |
p3Fallback = null | Func | Provides a fall back value for the third property in case of the property value cannot be obtained. |
p4Fallback = null | Func | Provides a fall back value for the fourth property in case of the property value cannot be obtained. |
p5Fallback = null | Func | Provides a fall back value for the fifth property in case of the property value cannot be obtained. |
Returns: IObservable
6. Overload¶
public static IObservable<TResult?> WhenChanged<TObject, TResult, TProperty1, TProperty2, TProperty3, TProperty4, TProperty5, TProperty6>(this TObject source, Expression<Func<TObject, TProperty1>> p1, Expression<Func<TObject, TProperty2>> p2, Expression<Func<TObject, TProperty3>> p3, Expression<Func<TObject, TProperty4>> p4, Expression<Func<TObject, TProperty5>> p5, Expression<Func<TObject, TProperty6>> p6, Func<TObject, TProperty1?, TProperty2?, TProperty3?, TProperty4?, TProperty5?, TProperty6?, TResult> resultSelector, Func<TProperty1>? p1Fallback = null, Func<TProperty2>? p2Fallback = null, Func<TProperty3>? p3Fallback = null, Func<TProperty4>? p4Fallback = null, Func<TProperty5>? p5Fallback = null, Func<TProperty6>? p6Fallback = null) where TObject : INotifyPropertyChanged
Summary: Produces an observable based on the combined values of the specified properties, including the initial value. ** A fallback value may be specified to ensure a notification is received when a value is unobtainable. For example when observing Parent.Child.Age, if Child is null the value is unobtainable as Age is a struct and cannot be set to Null. For an object like Parent.Child.Sibling, sibling is an object so if Child is null, the value null and obtainable and is returned as null.
Type parameters
| Name | Description |
|---|---|
TObject | The type of the object. |
TResult | The type of the result. |
TProperty1 | The type of the first property. |
TProperty2 | The type of the second property. |
TProperty3 | The type of the third property. |
TProperty4 | The type of the fourth property. |
TProperty5 | The type of the fifth property. |
TProperty6 | The type of the sixth property. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TObject | The source object. |
p1 | Expression | An expression to the first property. |
p2 | Expression | An expression to the second property. |
p3 | Expression | An expression to the third property. |
p4 | Expression | An expression to the fourth property. |
p5 | Expression | An expression to the fifth property. |
p6 | Expression | An expression to the sixth property. |
resultSelector | Func | A function which will select the result from the properties and the source. |
p1Fallback = null | Func | Provides a fall back value for the first property in case of the property value cannot be obtained. |
p2Fallback = null | Func | Provides a fall back value for the second property in case of the property value cannot be obtained. |
p3Fallback = null | Func | Provides a fall back value for the third property in case of the property value cannot be obtained. |
p4Fallback = null | Func | Provides a fall back value for the fourth property in case of the property value cannot be obtained. |
p5Fallback = null | Func | Provides a fall back value for the fifth property in case of the property value cannot be obtained. |
p6Fallback = null | Func | Provides a fall back value for the sixth property in case of the property value cannot be obtained. |
Returns: IObservable