Skip to content

ReactiveNotifyPropertyChangedMixin.SubscribeToExpressionChain(TSender?, Expression?) method

Defined in

Type: ReactiveNotifyPropertyChangedMixin Namespace: ReactiveUI.Binding.ObservableForProperty Assembly: ReactiveUI.Binding.dll

Applies to

net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481

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 skipInitial)
  • 3. public static IObservable<IObservedChange<TSender, TValue>> SubscribeToExpressionChain<TSender, TValue>(this TSender? source, Expression? expression, bool beforeChange, bool skipInitial, 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: Subscribes to an expression chain, observing after-change, emitting the initial value, with distinct filtering.

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?An expression which will point towards the property.

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

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 skipInitial)

View source

Summary: Subscribes to an expression chain, observing after-change with distinct filtering and a configurable initial value.

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?An expression which will point towards the property.
skipInitialboolIf we don't want to get a notification about the default value of the property.

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

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, bool isDistinct)

View source

Summary: Creates an observable which will subscribe to each property and sub-property specified in the Expression, providing 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?An 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.
isDistinctboolIf set to true, values are filtered with DistinctUntilChanged.

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