Search Results for

    Show / Hide Table of Contents

    Class ScriptSettings

    Inheritance
    Object
    ScriptSettings
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: GTA
    Assembly: ScriptHookVDotNet3.dll
    Syntax
    public sealed class ScriptSettings

    Methods

    | Improve this Doc View Source

    GetAllValues<T>(String, String)

    Reads all the values at a specified key and section from this ScriptSettings.

    Declaration
    public T[] GetAllValues<T>(string section, string name)
    Parameters
    Type Name Description
    String section

    The section where the value is.

    String name

    The name of the key the values are saved at.

    Returns
    Type Description
    T[]
    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    GetValue<T>(String, String, T)

    Reads a value from this ScriptSettings.

    Declaration
    public T GetValue<T>(string section, string name, T defaultvalue)
    Parameters
    Type Name Description
    String section

    The section where the value is.

    String name

    The name of the key the value is saved at.

    T defaultvalue

    The fall-back value if the key doesn't exist or casting to type T fails.

    Returns
    Type Description
    T

    The value at in .

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Load(String)

    Loads a ScriptSettings from the specified file.

    Declaration
    public static ScriptSettings Load(string filename)
    Parameters
    Type Name Description
    String filename

    The filename to load the settings from.

    Returns
    Type Description
    ScriptSettings
    | Improve this Doc View Source

    Save()

    Saves this ScriptSettings to file.

    Declaration
    public bool Save()
    Returns
    Type Description
    Boolean

    true if the file saved successfully; otherwise, false

    | Improve this Doc View Source

    SetValue<T>(String, String, T)

    Sets a value in this ScriptSettings.

    Declaration
    public void SetValue<T>(string section, string name, T value)
    Parameters
    Type Name Description
    String section

    The section where the value is.

    String name

    The name of the key the value is saved at.

    T value

    The value to set the key to.

    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX