WinformsCreatesObservableForProperty.GetNotificationForProperty(object, Expression, string) method¶
Defined in
Type: WinformsCreatesObservableForProperty
Namespace: ReactiveUI.Reactive.Winforms
Assembly: ReactiveUI.Winforms.Reactive.dll
Applies to
net10.0-windows10.0.19041, net9.0-windows10.0.19041, net8.0-windows10.0.19041, net462, net481, net471
Overloads¶
- 1.
public IObservable<IObservedChange<object, object?>> GetNotificationForProperty(object sender, Expression expression, string propertyName) - 2.
public IObservable<IObservedChange<object, object?>> GetNotificationForProperty(object sender, Expression expression, string propertyName, bool beforeChanged) - 3.
public IObservable<IObservedChange<object, object?>> GetNotificationForProperty(object sender, Expression expression, string propertyName, bool beforeChanged, bool suppressWarnings)
1. Overload¶
Attributes: [RequiresUnreferencedCode("Uses reflection over runtime types which is not trim- or AOT-safe.")]
public IObservable<IObservedChange<object, object?>> GetNotificationForProperty(object sender, Expression expression, string propertyName)
Inherited documentation
These docs were inherited from ICreatesObservableForProperty. The member doesn't override them on this type.
Summary: Subscribes to after-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. |
propertyName | string | The property name to observe. |
Returns: IObservable
2. Overload¶
Attributes: [RequiresUnreferencedCode("Uses reflection over runtime types which is not trim- or AOT-safe.")]
public IObservable<IObservedChange<object, object?>> GetNotificationForProperty(object sender, Expression expression, string propertyName, bool beforeChanged)
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. |
propertyName | string | The property name to observe. |
beforeChanged | bool | If true, signal before the property value changes; otherwise signal after the change. |
Returns: IObservable
3. Overload¶
Attributes: [RequiresUnreferencedCode("Uses reflection over runtime types which is not trim- or AOT-safe.")]
public IObservable<IObservedChange<object, object?>> GetNotificationForProperty(object sender, Expression expression, string propertyName, bool beforeChanged, bool suppressWarnings)
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 | bool | If true, signal before the property value changes; otherwise signal after the change. |
suppressWarnings | bool | If true, warnings should not be logged. |
Returns: IObservable
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. |