Class NotifyPropertySet
- Namespace
- JsonApiDotNetCore.OpenApi.Client.NSwag
- Assembly
- JsonApiDotNetCore.OpenApi.Client.NSwag.dll
Implementation of INotifyPropertyChanged that unconditionally raises the PropertyChanged event when a property is assigned. Exists to support JSON:API partial POST/PATCH.
[PublicAPI]
public abstract class NotifyPropertySet : INotifyPropertyChanged
- Inheritance
-
NotifyPropertySet
- Implements
- Inherited Members
Methods
OnPropertyChanged(PropertyChangedEventArgs)
Raises this object's PropertyChanged event.
protected virtual void OnPropertyChanged(PropertyChangedEventArgs args)
Parameters
RaisePropertyChanged(string?)
Raises this object's PropertyChanged event.
protected void RaisePropertyChanged(string? propertyName = null)
Parameters
propertyNamestringName of the property used to notify listeners. This value is optional and can be provided automatically when invoked from compilers that support CallerMemberNameAttribute.
SetProperty<T>(ref T, T, string?)
Sets the property and notifies listeners.
protected virtual bool SetProperty<T>(ref T storage, T value, string? propertyName = null)
Parameters
storageTReference to a property with both getter and setter.
valueTDesired value for the property.
propertyNamestringName of the property used to notify listeners. This value is optional and can be provided automatically when invoked from compilers that support CallerMemberName.
Returns
- bool
Always
true.
Type Parameters
TType of the property.
Events
PropertyChanged
Occurs when a property is set.
public event PropertyChangedEventHandler? PropertyChanged