Class ConfigEntryBase
Container for a single setting of a ConfigFile. Each config entry is linked to one config file.
Namespace: BepInEx.Configuration
Assembly: BepInEx.dll
Syntax
public abstract class ConfigEntryBase
Properties
Get or set the value of the setting.
Declaration
public abstract object BoxedValue { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
Config file this entry is a part of.
Declaration
public ConfigFile ConfigFile { get; }
Property Value
Type | Description |
---|---|
ConfigFile |
Default value of this setting (set only if the setting was not changed before).
Declaration
public object DefaultValue { get; }
Property Value
Type | Description |
---|---|
System.Object |
Category and name of this setting. Used as a unique key for identification within a ConfigFile.
Declaration
public ConfigDefinition Definition { get; }
Property Value
Type | Description |
---|---|
ConfigDefinition |
Description / metadata of this setting.
Declaration
public ConfigDescription Description { get; }
Property Value
Type | Description |
---|---|
ConfigDescription |
Type of the BoxedValue that this setting holds.
Declaration
public Type SettingType { get; }
Property Value
Type | Description |
---|---|
System.Type |
Methods
If necessary, clamp the value to acceptable value range. T has to be equal to settingType.
Declaration
protected T ClampValue<T>(T value)
Parameters
Type | Name | Description |
---|---|---|
T |
value |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T |
Get the serialized representation of the value.
Declaration
public string GetSerializedValue()
Returns
Type | Description |
---|---|
System.String |
Trigger setting changed event.
Declaration
protected void OnSettingChanged(object sender)
Parameters
Type | Name | Description |
---|---|---|
System.Object |
sender |
Set the value by using its serialized form.
Declaration
public void SetSerializedValue(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String |
value |
Write a description of this setting using all available metadata.
Declaration
public void WriteDescription(StreamWriter writer)
Parameters
Type | Name | Description |
---|---|---|
System.IO.StreamWriter |
writer |