Skip to content

DependencyObjectObservableForProperty.GetNotificationForProperty(object, Expression, string, bool, bool) method

Defined in

Type: DependencyObjectObservableForProperty Namespace: ReactiveUI Assembly: ReactiveUI.Maui.dll

Applies to

net10.0-windows10.0.19041, net10.0-windows10.0.19041, net10.0-windows10.0.19041, net9.0-windows10.0.19041, net9.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net462, net481

Attributes: [RequiresUnreferencedCode("GetNotificationForProperty uses methods that may require unreferenced code")]

public IObservable<IObservedChange<object, object?>> GetNotificationForProperty(object sender, Expression expression, string propertyName, bool beforeChanged = false, bool suppressWarnings = false)

View source

Inherited documentation

These docs were inherited from ICreatesObservableForProperty. The member doesn't override them on this type.

Summary: Subscribes to change notifications for the specified propertyName on sender.

Parameters

NameTypeDescription
senderobjectThe object to observe.
expressionExpressionThe expression describing the observed member. This is typically a MemberExpression or an IndexExpression.
propertyNamestringThe property name to observe.
beforeChanged = falseboolIf true, signal before the property value changes; otherwise signal after the change.
suppressWarnings = falseboolIf true, warnings should not be logged.

Returns: IObservable> -- An observable that produces an IObservedChange whenever the observed property changes. If observing is not possible for the specified beforeChanged value, implementations should return an observable that never produces values.

Remarks

The expression describes the observed member and is used to populate IObservedChange instances emitted by the returned observable.

Exceptions

TypeCondition
System.ArgumentExceptionThrown when sender is not compatible with the observing mechanism implemented by the instance.