Table of Contents

Class PluginSetting<T>

Namespace
Artemis.Core
Assembly
Artemis.Core.dll

Represents a setting tied to a plugin of type T

public class PluginSetting<T> : CorePropertyChanged, IPluginSetting

Type Parameters

T

The value type of the setting

Inheritance
object
CorePropertyChanged
PluginSetting<T>
Implements

Properties

AutoSave

Gets or sets whether changes must automatically be saved

public bool AutoSave { get; set; }

Property Value

bool

HasChanged

public bool HasChanged { get; }

Property Value

bool

Name

The name of the setting, unique to this plugin

public string Name { get; }

Property Value

string

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

EventHandler

SettingSaved

Occurs when the value of the setting has been saved

public event EventHandler? SettingSaved

Event Type

EventHandler