IConfig
Members
Namespace: ASPSecurityKit
Assembly: ASPSecurityKit.dll
Summary
Provides an interface to access application configuration.
Methods
GetSettingOrDefault<TValue>(key,defaultValue)
Summary
Gets the appSetting value from the application configuration by the specified key or the specified default value if there’s no such setting.
Returns
The appSetting value from the application configuration by the specified key or the specified default value if there’s no such setting.
Parameters
Name | Type | Description |
---|---|---|
key | System.String | The key. |
defaultValue | TValue | The default value. |
Generic Types
Name | Description |
---|---|
TValue | The type of the value. |
Remarks
If the found appSetting is not of type TValue
, an exception (say of type InvalidCastException) should be thrown.