Table of Contents

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

args PropertyChangedEventArgs

The PropertyChangedEventArgs.

RaisePropertyChanged(string?)

Raises this object's PropertyChanged event.

protected void RaisePropertyChanged(string? propertyName = null)

Parameters

propertyName string

Name 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

storage T

Reference to a property with both getter and setter.

value T

Desired value for the property.

propertyName string

Name 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

T

Type of the property.

Events

PropertyChanged

Occurs when a property is set.

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler