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)
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
| Name | Type | Description |
|---|---|---|
sender | object | The object to observe. |
expression | Expression | The expression describing the observed member. This is typically a MemberExpression or an IndexExpression. |
propertyName | string | The property name to observe. |
beforeChanged = false | bool | If true, signal before the property value changes; otherwise signal after the change. |
suppressWarnings = false | bool | If true, warnings should not be logged. |
Returns: IObservablebeforeChanged 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
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown when sender is not compatible with the observing mechanism implemented by the instance. |