Search Results for

    Show / Hide Table of Contents

    Interface IModPrefs

    Allows to get and set preferences for your mod.

    Namespace: IPA.Config
    Assembly: IPA.Loader.dll
    Syntax
    [Obsolete("Uses IniFile, which uses 16 bit system calls. Use the new object based config system.")]
    public interface IModPrefs

    Methods

    | Improve this Doc View Source

    GetBool(String, String, Boolean, Boolean)

    Gets a bool from the ini.

    Declaration
    bool GetBool(string section, string name, bool defaultValue = false, bool autoSave = false)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.Boolean defaultValue

    Value that should be used when no value is found.

    System.Boolean autoSave

    Whether or not the default value should be written if no value is found.

    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    GetFloat(String, String, Single, Boolean)

    Gets a float from the ini.

    Declaration
    float GetFloat(string section, string name, float defaultValue = 0F, bool autoSave = false)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.Single defaultValue

    Value that should be used when no value is found.

    System.Boolean autoSave

    Whether or not the default value should be written if no value is found.

    Returns
    Type Description
    System.Single
    | Improve this Doc View Source

    GetInt(String, String, Int32, Boolean)

    Gets an int from the ini.

    Declaration
    int GetInt(string section, string name, int defaultValue = 0, bool autoSave = false)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.Int32 defaultValue

    Value that should be used when no value is found.

    System.Boolean autoSave

    Whether or not the default value should be written if no value is found.

    Returns
    Type Description
    System.Int32
    | Improve this Doc View Source

    GetString(String, String, String, Boolean)

    Gets a string from the ini.

    Declaration
    string GetString(string section, string name, string defaultValue = "", bool autoSave = false)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.String defaultValue

    Value that should be used when no value is found.

    System.Boolean autoSave

    Whether or not the default value should be written if no value is found.

    Returns
    Type Description
    System.String
    | Improve this Doc View Source

    HasKey(String, String)

    Checks whether or not a key exists in the ini.

    Declaration
    bool HasKey(string section, string name)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    SetBool(String, String, Boolean)

    Sets a bool in the ini.

    Declaration
    void SetBool(string section, string name, bool value)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.Boolean value

    Value that should be written.

    | Improve this Doc View Source

    SetFloat(String, String, Single)

    Sets a float in the ini.

    Declaration
    void SetFloat(string section, string name, float value)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.Single value

    Value that should be written.

    | Improve this Doc View Source

    SetInt(String, String, Int32)

    Sets an int in the ini.

    Declaration
    void SetInt(string section, string name, int value)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.Int32 value

    Value that should be written.

    | Improve this Doc View Source

    SetString(String, String, String)

    Sets a string in the ini.

    Declaration
    void SetString(string section, string name, string value)
    Parameters
    Type Name Description
    System.String section

    Section of the key.

    System.String name

    Name of the key.

    System.String value

    Value that should be written.

    Extension Methods

    ReflectionUtil.SetField<T, U>(T, String, U)
    ReflectionUtil.GetField<U, T>(T, String)
    ReflectionUtil.SetProperty<T, U>(T, String, U)
    ReflectionUtil.GetProperty<U, T>(T, String)
    ReflectionUtil.InvokeMethod<U, T>(T, String, Object[])
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX