Class NotifiyingJsonSettings
- Namespace
- Nucs.JsonSettings
- Assembly
- Nucs.JsonSettings.dll
A JsonSettings that implements INotifyPropertyChanged and INotifyPropertyChanging.
public abstract class NotifiyingJsonSettings : JsonSettings, ISavable, IDisposable, INotifyPropertyChanged, INotifyPropertyChanging
- Inheritance
-
NotifiyingJsonSettings
- Implements
- Inherited Members
- Extension Methods
Remarks
This base provides the notification interface that data binding and the autosave
package's nested-change binding key on: raise OnPropertyChanged(string) from your
setters, or let the [NotifyChanges] aspect weave the raise in. Nothing autosaves
by itself -- call EnableAutosave() (Nucs.JsonSettings.Autosave), which attaches
the autosave module and, because this class implements the interface, a
NotificationBinder that also saves on nested collection/object changes. Every change
commits a save; there is no built-in throttling -- batch bursts of writes with
SuspendAutosave().
Constructors
NotifiyingJsonSettings()
protected NotifiyingJsonSettings()
NotifiyingJsonSettings(string)
protected NotifiyingJsonSettings(string fileName)
Parameters
fileNamestring
Methods
OnPropertyChanged(string)
public virtual void OnPropertyChanged(string propertyName = null)
Parameters
propertyNamestring
OnPropertyChanging(string)
public virtual void OnPropertyChanging(string propertyName = null)
Parameters
propertyNamestring
Events
PropertyChanged
Occurs when a property value changes.
public event PropertyChangedEventHandler? PropertyChanged
Event Type
PropertyChanging
Raised before a property changes. Fired by the [NotifyChanges] aspect (from the
Nucs.JsonSettings.NotifyChanges package) ahead of the assignment; raise it by hand
from a manual setter if you are not using the aspect.
public event PropertyChangingEventHandler? PropertyChanging