Class PluginSetting<T>
Represents a setting tied to a plugin of type T
public class PluginSetting<T> : CorePropertyChanged, IPluginSetting
Type Parameters
TThe value type of the setting
- Inheritance
-
objectCorePropertyChangedPluginSetting<T>
- Implements
Properties
AutoSave
Gets or sets whether changes must automatically be saved
public bool AutoSave { get; set; }
Property Value
HasChanged
public bool HasChanged { get; }
Property Value
Name
The name of the setting, unique to this plugin
public string Name { get; }
Property Value
Value
The value of the setting
public T? Value { get; set; }
Property Value
- T
Methods
OnSettingChanged()
Invokes the SettingChanged event
protected virtual void OnSettingChanged()
OnSettingSaved()
Invokes the OnSettingSaved() event
protected virtual void OnSettingSaved()
RejectChanges()
Resets the setting to the last saved value
public void RejectChanges()
Save()
Saves the setting
public void Save()
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Events
SettingChanged
Occurs when the value of the setting has been changed
public event EventHandler? SettingChanged
Event Type
SettingSaved
Occurs when the value of the setting has been saved
public event EventHandler? SettingSaved