Search Results for

    Show / Hide Table of Contents

    Interface IConfigurationService

    Gets and sets configuration values

    Namespace: Simplic.Configuration
    Assembly: Simplic.Configuration.dll
    Syntax
    public interface IConfigurationService

    Methods

    | Improve this Doc View Source

    Create<T>(String, String, Int32, Boolean, T)

    Create a new configuration entry

    Declaration
    void Create<T>(string configurationName, string pluginName, int type, bool editable, T configurationValue)
    Parameters
    Type Name Description
    System.String configurationName

    Configuration name

    System.String pluginName

    Plugin name

    System.Int32 type

    Type (0 = string, 1 = int, 5 = bool)

    System.Boolean editable

    Determines whether the configuration is editable

    T configurationValue

    Configuration value

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    Exists(String, String)

    Checks whether a configuration exists

    Declaration
    bool Exists(string configurationName, string pluginName)
    Parameters
    Type Name Description
    System.String configurationName

    Configuration name

    System.String pluginName

    Plugin name

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

    GetValue<T>(String, String, String, Boolean)

    Gets a configuration value

    Declaration
    T GetValue<T>(string configurationName, string pluginName, string userName, bool noCaching = false)
    Parameters
    Type Name Description
    System.String configurationName

    Name of the setting

    System.String pluginName

    Name of the plugin

    System.String userName

    Name of the user. Uses user-independent setting if empty

    System.Boolean noCaching

    If true, the value will not be loaded from the cache nor stored.

    Returns
    Type Description
    T

    Configuration value casted to T

    Type Parameters
    Name Description
    T

    Target type

    | Improve this Doc View Source

    GetValues<T>(String, String)

    Get an enumerable of configuration values by its plugin name

    Declaration
    IEnumerable<ConfigurationValue> GetValues<T>(string pluginName, string userName)
    Parameters
    Type Name Description
    System.String pluginName

    Name of the plugin

    System.String userName

    Name of the user. Uses user-independent setting if empty

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<ConfigurationValue>

    Enumerable of values casted to T

    Type Parameters
    Name Description
    T

    Expected type

    | Improve this Doc View Source

    SetValue<T>(String, String, String, T)

    Sets a configuration

    Declaration
    void SetValue<T>(string configurationName, string pluginName, string userName, T value)
    Parameters
    Type Name Description
    System.String configurationName

    Name of the configuration

    System.String pluginName

    Name of the plugin

    System.String userName

    Name of the user. Uses user-independent setting if empty

    T value

    Configuration value

    Type Parameters
    Name Description
    T

    Input type

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx