ReactiveNotifyPropertyChangedMixin.SubscribeToExpressionChain(TSender?, Expression?) method¶
Defined in
Type: ReactiveNotifyPropertyChangedMixin
Namespace: ReactiveUI
Assembly: ReactiveUI.dll
Applies to
net10.0, net10.0-android36.0, net10.0-ios26.0, net10.0-macos26.0, net10.0-windows10.0.19041, net10.0-tvos26.0, net10.0-maccatalyst26.0, net10.0-desktop1.0, net10.0-browserwasm1.0, net9.0, net9.0-tvos18.0, net9.0-maccatalyst18.0, net9.0-windows10.0.19041, net9.0-desktop1.0, net9.0-browserwasm1.0, net9.0-macos15.0, net9.0-ios18.0, net9.0-android35.0, net8.0, net8.0-macos14.5, net8.0-macos14.2, net8.0-maccatalyst17.5, net8.0-ios17.5, net8.0-tvos18.0, net8.0-macos15.0, net8.0-ios18.0, net8.0-windows10.0.19041, net8.0-maccatalyst18.0, net8.0-tvos17.2, netstandard2.1, net481, net462
Overloads¶
- 1.
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression) - 2.
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange) - 3.
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange, bool skipInitial) - 4.
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange, bool skipInitial, bool suppressWarnings) - 5.
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange, bool skipInitial, bool suppressWarnings, bool isDistinct)
1. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression)
Summary: Creates a observable which will subscribe to the each property and sub property specified in the Expression. eg It will subscribe to x => x.Property1.Property2.Property3 each property in the lambda expression. It will then provide updates to the last value in the chain.
Type parameters
| Name | Description |
|---|---|
TSender | The type of the origin of the expression chain. |
TValue | The end value we want to subscribe to. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TSender? | The object where we start the chain. |
expression | Expression? | A expression which will point towards the property. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.InvalidCastException | If we cannot cast from the target value from the specified last property. |
2. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange)
Summary: Creates a observable which will subscribe to the each property and sub property specified in the Expression. eg It will subscribe to x => x.Property1.Property2.Property3 each property in the lambda expression. It will then provide updates to the last value in the chain.
Type parameters
| Name | Description |
|---|---|
TSender | The type of the origin of the expression chain. |
TValue | The end value we want to subscribe to. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TSender? | The object where we start the chain. |
expression | Expression? | A expression which will point towards the property. |
beforeChange | bool | If we are interested in notifications before the property value is changed. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.InvalidCastException | If we cannot cast from the target value from the specified last property. |
3. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange, bool skipInitial)
Summary: Creates a observable which will subscribe to the each property and sub property specified in the Expression. eg It will subscribe to x => x.Property1.Property2.Property3 each property in the lambda expression. It will then provide updates to the last value in the chain.
Type parameters
| Name | Description |
|---|---|
TSender | The type of the origin of the expression chain. |
TValue | The end value we want to subscribe to. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TSender? | The object where we start the chain. |
expression | Expression? | A expression which will point towards the property. |
beforeChange | bool | If we are interested in notifications before the property value is changed. |
skipInitial | bool | If we don't want to get a notification about the default value of the property. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.InvalidCastException | If we cannot cast from the target value from the specified last property. |
4. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange, bool skipInitial, bool suppressWarnings)
Summary: Creates a observable which will subscribe to the each property and sub property specified in the Expression. eg It will subscribe to x => x.Property1.Property2.Property3 each property in the lambda expression. It will then provide updates to the last value in the chain.
Type parameters
| Name | Description |
|---|---|
TSender | The type of the origin of the expression chain. |
TValue | The end value we want to subscribe to. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TSender? | The object where we start the chain. |
expression | Expression? | A expression which will point towards the property. |
beforeChange | bool | If we are interested in notifications before the property value is changed. |
skipInitial | bool | If we don't want to get a notification about the default value of the property. |
suppressWarnings | bool | If true, no warnings should be logged. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.InvalidCastException | If we cannot cast from the target value from the specified last property. |
5. Overload¶
Attributes: [RequiresUnreferencedCode("Evaluates expression-based member chains via reflection; members may be trimmed.")]
public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange, bool skipInitial, bool suppressWarnings, bool isDistinct)
Summary: Creates a observable which will subscribe to the each property and sub property specified in the Expression. eg It will subscribe to x => x.Property1.Property2.Property3 each property in the lambda expression. It will then provide updates to the last value in the chain.
Type parameters
| Name | Description |
|---|---|
TSender | The type of the origin of the expression chain. |
TValue | The end value we want to subscribe to. |
Parameters
| Name | Type | Description |
|---|---|---|
source | TSender? | The object where we start the chain. |
expression | Expression? | A expression which will point towards the property. |
beforeChange | bool | If we are interested in notifications before the property value is changed. |
skipInitial | bool | If we don't want to get a notification about the default value of the property. |
suppressWarnings | bool | If true, no warnings should be logged. |
isDistinct | bool | if set to true [is distinct]. |
Returns: IObservable
Exceptions
| Type | Condition |
|---|---|
| System.InvalidCastException | If we cannot cast from the target value from the specified last property. |