Show / Hide Table of Contents

Method BindConfigInOrder

| Edit this page View Source

BindConfigInOrder<T>(ConfigFile, string, string, T, string, bool, bool, bool, AcceptableValueBase, Action<ConfigEntryBase>, ConfigurationManagerAttributes)

Bind a new config entry to the config file and modify description to state whether the config entry is synced or not.
Declaration
public static ConfigEntry<T> BindConfigInOrder<T>(this ConfigFile configFile, string section, string key, T defaultValue, string description, bool synced = true, bool sectionOrder = true, bool settingOrder = true, AcceptableValueBase acceptableValues = null, Action<ConfigEntryBase> customDrawer = null, ConfigurationManagerAttributes configAttributes = null)
Parameters
Type Name Description
ConfigFile configFile Configuration file to bind the config entry to.
string section Configuration file section to list the config entry in. Settings are grouped by this.
string key Name of the setting.
T defaultValue Default value of the config entry.
string description Plain text description of the config entry to display as hover text in configuration manager.
bool synced Whether the config entry IsAdminOnly and should be synced with server.
bool sectionOrder Whether to number the section names using a prefix based on the order they are bound to the config file.
bool settingOrder Whether to order the settings in each section based on the order they are bound to the config file.
AcceptableValueBase acceptableValues Acceptable values for config entry as an AcceptableValueRange, AcceptableValueList, or custom subclass.
Action<ConfigEntryBase> customDrawer Custom setting editor (OnGUI code that replaces the default editor provided by ConfigurationManager).
ConfigurationManagerAttributes configAttributes Config manager attributes for additional user specified functionality. Any fields of BindConfig will overwrite properties in configAttributes.
Returns
Type Description
ConfigEntry<T> ConfigEntry bound to the config file.
Type Parameters
Name Description
T Type of the value the config entry holds.
  • Edit this page
  • View Source
☀
☾
In this article
Back to top
Generated by DocFX
☀
☾