Search Results for

    Show / Hide Table of Contents

    Class Config

    An abstraction of a config file on disk, which handles synchronizing between a memory representation and the disk representation.

    Inheritance
    System.Object
    Config
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: IPA.Config
    Assembly: IPA.Loader.dll
    Syntax
    public class Config

    Properties

    | Improve this Doc View Source

    Name

    Gets the name associated with this Config object.

    Declaration
    public string Name { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    Provider

    Gets the IConfigProvider associated with this Config object.

    Declaration
    public IConfigProvider Provider { get; }
    Property Value
    Type Description
    IConfigProvider

    Methods

    | Improve this Doc View Source

    GetConfigFor(String, String[])

    Gets a Config object using the specified list of preferred config types.

    Declaration
    public static Config GetConfigFor(string configName, params string[] extensions)
    Parameters
    Type Name Description
    System.String configName

    the name of the mod for this config

    System.String[] extensions

    the preferred config types to try to get

    Returns
    Type Description
    Config

    a Config using the requested format, or of type JSON.

    | Improve this Doc View Source

    LoadAsync()

    Forces an asynchronous load from disk.

    Declaration
    public Task LoadAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    | Improve this Doc View Source

    LoadSync()

    Forces a synchronous load from disk.

    Declaration
    public void LoadSync()
    | Improve this Doc View Source

    Register(Type)

    Registers a IConfigProvider to use for configs.

    Declaration
    public static void Register(Type type)
    Parameters
    Type Name Description
    System.Type type

    the type to register

    | Improve this Doc View Source

    Register<T>()

    Registers a IConfigProvider to use for configs.

    Declaration
    public static void Register<T>()
        where T : IConfigProvider, new()
    Type Parameters
    Name Description
    T

    the type to register

    | Improve this Doc View Source

    SetStore(IConfigStore)

    Sets this object's IConfigStore. Can only be called once.

    Declaration
    public void SetStore(IConfigStore store)
    Parameters
    Type Name Description
    IConfigStore store

    the IConfigStore to add to this instance

    Exceptions
    Type Condition
    System.InvalidOperationException

    If this was called before.

    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[])
    GeneratedStore.Generated<T>(Config, Boolean)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX