Table of Contents

Class OptionManager

Namespace
ConfigurableWarning.API.Internal
Assembly
RedstoneWizard08.ContentLibrary.dll

Manages options' loading, saving, registration, and accessing.

public class OptionManager
Inheritance
OptionManager
Inherited Members

Properties

Instance

The current instance of this OptionManager.

public static OptionManager Instance { get; }

Property Value

OptionManager

SaveLoader

The internally used instance of the DefaultSettingsSaveLoad.

public static DefaultSettingsSaveLoad SaveLoader { get; }

Property Value

DefaultSettingsSaveLoad

Methods

Get(string)

Gets an option by its name.

public IUntypedOption? Get(string name)

Parameters

name string

The option's name.

Returns

IUntypedOption

The untyped form of the option.

Get<T>(string)

Gets a typed option by its name.

public IOption<T>? Get<T>(string name)

Parameters

name string

The option's name.

Returns

IOption<T>

The option.

Type Parameters

T

The option's type.

Register(IUntypedOption)

Registers an untyped option, initializing and setting it up.

public void Register(IUntypedOption opt)

Parameters

opt IUntypedOption

The option to register.

Register<T>(IOption<T>)

Registers a typed option, initializing and setting it up. This will convert it to a IUntypedOption.

public void Register<T>(IOption<T> opt)

Parameters

opt IOption<T>

The option to register.

Type Parameters

T

The option's value type.