Table of Contents

Class NotifiyingJsonSettings

Namespace
Nucs.JsonSettings
Assembly
Nucs.JsonSettings.dll
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

fileName string

Methods

OnPropertyChanged(string)

public virtual void OnPropertyChanged(string propertyName = null)

Parameters

propertyName string

OnPropertyChanging(string)

public virtual void OnPropertyChanging(string propertyName = null)

Parameters

propertyName string

Events

PropertyChanged

Occurs when a property value changes.

public event PropertyChangedEventHandler? PropertyChanged

Event Type

PropertyChangedEventHandler

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

Event Type

PropertyChangingEventHandler