Class Config
Provides access to application configuration values.
Configuration property definitions are registered in code and stored in the Properties collection. Actual values are stored separately and may exist at different scopes: * User * Company * System
Effective values are resolved using the following order: User -> Company -> System -> DefaultValue
Company values are resolved using DbConfig.CompanyId. User values are resolved using the current application user.
public static class Config
- Inheritance
-
Config
- Inherited Members
Fields
SSelectListRowLimit
The configuration property name used as the row limit for DataModule list SELECTs.
public const string SSelectListRowLimit = "SelectListRowLimit"
Field Value
SShowDataFormFactBoxPane
The configuration property name used to show the DataForm FactBox pane initially.
public const string SShowDataFormFactBoxPane = "ShowDataFormFactBoxPane"
Field Value
Properties
Module
Gets the underlying configuration module provider instance layer.
public static SysConfigModule Module { get; }
Property Value
Store
Gets the SQL store used by the Config system.
public static SqlStore Store { get; }
Property Value
Methods
GetObjectValue<T>(string)
Returns the effective object value of a configuration property.
Resolution order: User, Company, System, DefaultValue.
public static T GetObjectValue<T>(string Name) where T : class
Parameters
Namestring
Returns
- T
Type Parameters
T
GetObjectValue<T>(string, string, string)
Returns the effective object value of a configuration property using the specified company and user context.
Resolution order: User, Company, System, DefaultValue.
public static T GetObjectValue<T>(string Name, string CompanyId, string UserName) where T : class
Parameters
Returns
- T
Type Parameters
T
GetObjectValue<T>(string, ConfigScope, string)
Returns the object value stored at the specified scope. No effective value resolution takes place.
public static T GetObjectValue<T>(string Name, ConfigScope Scope, string OwnerKey) where T : class
Parameters
NamestringScopeConfigScopeOwnerKeystring
Returns
- T
Type Parameters
T
GetValue(string)
Returns the effective value of a configuration property.
Resolution order: User, Company, System, DefaultValue.
This method returns the value associated with the current Company and current User.
public static string GetValue(string Name)
Parameters
Namestring
Returns
GetValue(string, string, string)
Returns the effective value of a configuration property using the specified company and user context.
Resolution order: User, Company, System, DefaultValue.
public static string GetValue(string Name, string CompanyId, string UserName)
Parameters
Returns
GetValue(string, ConfigScope, string)
Returns the value stored at the specified scope. No effective value resolution takes place.
public static string GetValue(string Name, ConfigScope Scope, string OwnerKey)
Parameters
NamestringScopeConfigScopeOwnerKeystring
Returns
SetUserValue(string, string)
Stores a value associated with the current User, creating or updating the corresponding configuration entry.
public static void SetUserValue(string Name, string Value)
Parameters
SetValue(string, string, ConfigScope, string)
Stores a value at the specified scope, creating or updating the corresponding configuration entry.
public static void SetValue(string Name, string Value, ConfigScope Scope, string OwnerKey)
Parameters
NamestringValuestringScopeConfigScopeOwnerKeystring