Class ConfigurationManager
Manages configuration values
Inheritance
System.Object
ConfigurationManager
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: Simplic.Framework.Base
Assembly: Simplic.Framework.Base.dll
Syntax
[Obsolete("Use Simplic.Configuration.Service.IConfigurationService instead")]
public class ConfigurationManager
Properties
| Improve this Doc View SourceSingleton
Gets the instance of this manager
Declaration
public static ConfigurationManager Singleton { get; }
Property Value
Type | Description |
---|---|
ConfigurationManager |
Methods
| Improve this Doc View SourceGetValue<T>(String, String, String, Boolean)
Get a configuration value
Declaration
public T GetValue<T>(string configName, string pluginName, string UserName, bool noCaching = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | configName | Name of the configuration |
System.String | pluginName | Name of the plugin |
System.String | UserName | Name of the user |
System.Boolean | noCaching | Get a value directly from db |
Returns
Type | Description |
---|---|
T | Configuration value |
Type Parameters
Name | Description |
---|---|
T |
GetValues<T>(String, String)
Get an enumerable of configuration values by plugin and user name
Declaration
public IEnumerable<ConfigurationValue> GetValues<T>(string pluginName, string userName)
Parameters
Type | Name | Description |
---|---|---|
System.String | pluginName | PlugIn-Name |
System.String | userName | Current username, should be empty for ignoring |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ConfigurationValue> | Enumerable of values |
Type Parameters
Name | Description |
---|---|
T | Expected type |
SetValue<T>(String, String, String, T)
Sets a configuration value
Declaration
public void SetValue<T>(string configName, string pluginName, string userName, T value)
Parameters
Type | Name | Description |
---|---|---|
System.String | configName | Name of the configuration |
System.String | pluginName | Name of the plugin |
System.String | userName | Name of the user |
T | value | Configuration value |
Type Parameters
Name | Description |
---|---|
T |