RxRecord.RaiseAndSetIfChanged(T, T, string?) method¶
Defined in
Type: RxRecord
Namespace: ReactiveMarbles.Mvvm
Assembly: ReactiveMarbles.Mvvm.dll
Applies to
net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.0
protected void RaiseAndSetIfChanged<T>(ref T backingField, T newValue, string? propertyName = null)
Summary: RaiseAndSetIfChanged fully implements a Setter for a read-write property on a ReactiveObject, using CallerMemberName to raise the notification and the ref to the backing field to set the property.
Type parameters
| Name | Description |
|---|---|
T | The type of the value. |
Parameters
| Name | Type | Description |
|---|---|---|
ref backingField | T | A Reference to the backing field for this property. |
newValue | T | The new value. |
propertyName = null | string? | The name of the property, usually automatically provided through the CallerMemberName attribute. |