Table of Contents

Class AutosaveModule

Namespace
Nucs.JsonSettings.Autosave
Assembly
Nucs.JsonSettings.Autosave.dll

The module EnableAutosave() attaches to a woven settings instance: the shared suspension state of SuspensionModule plus the parts only the woven path needs -- the monitored-property set the woven advice consults, and the lifetime slot for the NotificationBinder.

public class AutosaveModule : SuspensionModule, IDisposable
Inheritance
AutosaveModule
Implements
Inherited Members

Remarks

Lives in this package -- where it is actually wired up -- rather than in the base package, which keeps only the neutral SuspensionModule primitive. SettingsBag attaches its own SettingsBagAutosaveModule, so this type never appears on a bag and the is AutosaveModule resolution scans in AutosaveRuntime and NotificationBinder match woven modules only. The gates, the suspension machine and the repopulate-driven loading bracket are all inherited; suspension reaches either module kind through the shared base (see SuspendAutosave).

Properties

NotificationsHandler

The notification handler taking care of binding and unbinding to property and collection changes.

public IDisposable? NotificationsHandler { get; set; }

Property Value

IDisposable

Remarks

A pure lifetime slot: EnableAutosave() parks the NotificationBinder here so this module disposes it when it is torn down. Nothing reaches through it any more -- the binder subscribes to the settings' repopulate events itself, where the load pipeline used to pattern-match this property for a resync interface -- which is why IDisposable is now the honest type rather than a compatibility compromise.

Methods

Dispose(bool)

protected override void Dispose(bool disposing)

Parameters

disposing bool

IsMonitored(string)

Whether a write to propertyName should commit a save.

public bool IsMonitored(string propertyName)

Parameters

propertyName string

Returns

bool