Skip to content

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)

View source

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

NameDescription
TSenderThe type of the origin of the expression chain.
TValueThe end value we want to subscribe to.

Parameters

NameTypeDescription
sourceTSender?The object where we start the chain.
expressionExpression?A expression which will point towards the property.

Returns: IObservable> -- A observable which notifies about observed changes.

Exceptions

TypeCondition
System.InvalidCastExceptionIf 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)

View source

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

NameDescription
TSenderThe type of the origin of the expression chain.
TValueThe end value we want to subscribe to.

Parameters

NameTypeDescription
sourceTSender?The object where we start the chain.
expressionExpression?A expression which will point towards the property.
beforeChangeboolIf we are interested in notifications before the property value is changed.

Returns: IObservable> -- A observable which notifies about observed changes.

Exceptions

TypeCondition
System.InvalidCastExceptionIf 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)

View source

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

NameDescription
TSenderThe type of the origin of the expression chain.
TValueThe end value we want to subscribe to.

Parameters

NameTypeDescription
sourceTSender?The object where we start the chain.
expressionExpression?A expression which will point towards the property.
beforeChangeboolIf we are interested in notifications before the property value is changed.
skipInitialboolIf we don't want to get a notification about the default value of the property.

Returns: IObservable> -- A observable which notifies about observed changes.

Exceptions

TypeCondition
System.InvalidCastExceptionIf 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)

View source

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

NameDescription
TSenderThe type of the origin of the expression chain.
TValueThe end value we want to subscribe to.

Parameters

NameTypeDescription
sourceTSender?The object where we start the chain.
expressionExpression?A expression which will point towards the property.
beforeChangeboolIf we are interested in notifications before the property value is changed.
skipInitialboolIf we don't want to get a notification about the default value of the property.
suppressWarningsboolIf true, no warnings should be logged.

Returns: IObservable> -- A observable which notifies about observed changes.

Exceptions

TypeCondition
System.InvalidCastExceptionIf 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)

View source

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

NameDescription
TSenderThe type of the origin of the expression chain.
TValueThe end value we want to subscribe to.

Parameters

NameTypeDescription
sourceTSender?The object where we start the chain.
expressionExpression?A expression which will point towards the property.
beforeChangeboolIf we are interested in notifications before the property value is changed.
skipInitialboolIf we don't want to get a notification about the default value of the property.
suppressWarningsboolIf true, no warnings should be logged.
isDistinctboolif set to true [is distinct].

Returns: IObservable> -- A observable which notifies about observed changes.

Exceptions

TypeCondition
System.InvalidCastExceptionIf we cannot cast from the target value from the specified last property.