Class SettingsBase
- Namespace
- Oscova.Agents.Settings
- Assembly
- Oscova.Agents.dll
Provides persistence and change notification for a settings domain.
public abstract class SettingsBase : INotifyPropertyChangedInheritance
Implements
Inherited Members
Constructors
- SettingsBase(IAppSettingsRepository, string, ILoggerFactory)
-
Initializes a settings domain for a repository and scope.
Fields
- Yaml
-
Serializes and deserializes settings content.
Properties
- IsLoaded
-
Gets whether the initial load has completed.
- SettingsKey
-
Gets the key used to store and load this settings domain.
Methods
- FromYaml(string)
-
Applies values from a YAML string to this instance.
- LoadAsync()
-
Loads this settings domain once.
- OnChanged()
-
Raises the domain change notification unless notifications are suppressed.
- OnPropertyChanged(string?)
-
Raises the property change notification unless notifications are suppressed.
- ReloadAsync()
-
Reloads this settings domain from the repository.
- SaveAsync()
-
Persists this settings domain and restores its last durable state when the write fails.
- SetProperty<T>(ref T, T, string?)
-
Updates a property and raises its change notifications when the value differs.
- ToYaml()
-
Serializes this settings instance to YAML.
- TrySaveAsync()
-
Attempts persistence without rolling back in-memory changes when the write fails.
- Changed
-
Fires when any property value changes unless notifications are suppressed.
- PropertyChanged
-
Fires when a property value changes.