Table of Contents

Class Config

Namespace
Tripous.Data
Assembly
Tripous.Data.dll

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

string

SShowDataFormFactBoxPane

The configuration property name used to show the DataForm FactBox pane initially.

public const string SShowDataFormFactBoxPane = "ShowDataFormFactBoxPane"

Field Value

string

Properties

Module

Gets the underlying configuration module provider instance layer.

public static SysConfigModule Module { get; }

Property Value

SysConfigModule

Store

Gets the SQL store used by the Config system.

public static SqlStore Store { get; }

Property Value

SqlStore

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

Name string

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

Name string
CompanyId string
UserName string

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

Name string
Scope ConfigScope
OwnerKey string

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

Name string

Returns

string

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

Name string
CompanyId string
UserName string

Returns

string

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

Name string
Scope ConfigScope
OwnerKey string

Returns

string

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

Name string
Value string

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

Name string
Value string
Scope ConfigScope
OwnerKey string