Search Results for

    Class ConfigSystem

    Inheritance
    object
    ConfigSystem
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: RedLoader
    Assembly: RedLoader.dll
    Syntax
    public static class ConfigSystem

    Fields

    Categories

    Declaration
    public static readonly List<ConfigCategory> Categories
    Field Value
    Type Description
    List<ConfigCategory>

    Mapper

    Declaration
    public static readonly TomlMapper Mapper
    Field Value
    Type Description
    TomlMapper

    OnPreferencesLoaded

    Occurs when a Preferences File has been loaded.

    string: Path of the Preferences File.

    Declaration
    public static readonly MelonEvent<string> OnPreferencesLoaded
    Field Value
    Type Description
    MelonEvent<string>

    OnPreferencesSaved

    Occurs when a Preferences File has been saved.

    string: Path of the Preferences File.

    Declaration
    public static readonly MelonEvent<string> OnPreferencesSaved
    Field Value
    Type Description
    MelonEvent<string>

    ReflectiveCategories

    Declaration
    public static readonly List<ReflectiveConfigCategory> ReflectiveCategories
    Field Value
    Type Description
    List<ReflectiveConfigCategory>

    Methods

    CreateCategory(string)

    Declaration
    public static ConfigCategory CreateCategory(string identifier)
    Parameters
    Type Name Description
    string identifier
    Returns
    Type Description
    ConfigCategory

    CreateCategory(string, string)

    Declaration
    public static ConfigCategory CreateCategory(string identifier, string display_name = null)
    Parameters
    Type Name Description
    string identifier
    string display_name
    Returns
    Type Description
    ConfigCategory

    CreateCategory(string, string, bool, bool)

    Declaration
    public static ConfigCategory CreateCategory(string identifier, string display_name = null, bool is_hidden = false, bool should_save = true)
    Parameters
    Type Name Description
    string identifier
    string display_name
    bool is_hidden
    bool should_save
    Returns
    Type Description
    ConfigCategory

    CreateCategory<T>(string, string)

    Declaration
    public static ReflectiveConfigCategory CreateCategory<T>(string identifier, string display_name = null) where T : new()
    Parameters
    Type Name Description
    string identifier
    string display_name
    Returns
    Type Description
    ReflectiveConfigCategory
    Type Parameters
    Name Description
    T

    CreateEntry<T>(string, string, T, string, bool)

    Declaration
    [Obsolete]
    public static ConfigEntry CreateEntry<T>(string category_identifier, string entry_identifier, T default_value, string display_name, bool is_hidden)
    Parameters
    Type Name Description
    string category_identifier
    string entry_identifier
    T default_value
    string display_name
    bool is_hidden
    Returns
    Type Description
    ConfigEntry
    Type Parameters
    Name Description
    T

    CreateEntry<T>(string, string, T, string, string, bool, bool, ValueValidator)

    Declaration
    public static ConfigEntry<T> CreateEntry<T>(string category_identifier, string entry_identifier, T default_value, string display_name = null, string description = null, bool is_hidden = false, bool dont_save_default = false, ValueValidator validator = null)
    Parameters
    Type Name Description
    string category_identifier
    string entry_identifier
    T default_value
    string display_name
    string description
    bool is_hidden
    bool dont_save_default
    ValueValidator validator
    Returns
    Type Description
    ConfigEntry<T>
    Type Parameters
    Name Description
    T

    CreateFileCategory(string, string, string)

    Create a new category which will be saved to a custom file.

    Declaration
    public static ConfigCategory CreateFileCategory(string identifier, string display_name, string file_name)
    Parameters
    Type Name Description
    string identifier
    string display_name
    string file_name

    The relative filepath

    Returns
    Type Description
    ConfigCategory

    GetCategory(string)

    Declaration
    public static ConfigCategory GetCategory(string identifier)
    Parameters
    Type Name Description
    string identifier
    Returns
    Type Description
    ConfigCategory

    GetCategory<T>(string)

    Declaration
    public static T GetCategory<T>(string identifier) where T : new()
    Parameters
    Type Name Description
    string identifier
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetEntry(string, string)

    Declaration
    public static ConfigEntry GetEntry(string category_identifier, string entry_identifier)
    Parameters
    Type Name Description
    string category_identifier
    string entry_identifier
    Returns
    Type Description
    ConfigEntry

    GetEntryValue<T>(string, string)

    Declaration
    public static T GetEntryValue<T>(string category_identifier, string entry_identifier)
    Parameters
    Type Name Description
    string category_identifier
    string entry_identifier
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    GetEntry<T>(string, string)

    Declaration
    public static ConfigEntry<T> GetEntry<T>(string category_identifier, string entry_identifier)
    Parameters
    Type Name Description
    string category_identifier
    string entry_identifier
    Returns
    Type Description
    ConfigEntry<T>
    Type Parameters
    Name Description
    T

    GetFilePath(string)

    Gets the absulute path of a Preferences File.

    Declaration
    public static string GetFilePath(string fileName)
    Parameters
    Type Name Description
    string fileName

    Filename relative to the userdata path

    Returns
    Type Description
    string

    The absolute filepath

    HasEntry(string, string)

    Declaration
    public static bool HasEntry(string category_identifier, string entry_identifier)
    Parameters
    Type Name Description
    string category_identifier
    string entry_identifier
    Returns
    Type Description
    bool

    Load()

    Declaration
    public static void Load()

    RemoveCategoryFromFile(string, string)

    Declaration
    public static void RemoveCategoryFromFile(string filePath, string categoryName)
    Parameters
    Type Name Description
    string filePath
    string categoryName

    Save()

    Declaration
    public static void Save()

    SaveCategory<T>(string, bool)

    Declaration
    public static void SaveCategory<T>(string identifier, bool printmsg = true)
    Parameters
    Type Name Description
    string identifier
    bool printmsg
    Type Parameters
    Name Description
    T

    SetEntryValue<T>(string, string, T)

    Declaration
    public static void SetEntryValue<T>(string category_identifier, string entry_identifier, T value)
    Parameters
    Type Name Description
    string category_identifier
    string entry_identifier
    T value
    Type Parameters
    Name Description
    T