Skip to main content

ConfigUtils

Assembly: ServiceStack.dll​
View Source​
Declaration
public class ConfigUtils

Fields​

ItemSeperator​

View Source​
Declaration
public const char ItemSeperator = ','

KeyValueSeperator​

View Source​
Declaration
public const char KeyValueSeperator = ':'

Methods​

GetNullableAppSetting(String)​

Gets the nullable app setting.

View Source​
Declaration
public static string GetNullableAppSetting(string key)
Returns​

System.String

Parameters​
TypeName
System.Stringkey

GetAppSetting(String)​

Gets the app setting.

View Source​
Declaration
public static string GetAppSetting(string key)
Returns​

System.String

Parameters​
TypeName
System.Stringkey

GetAppSetting(String, String)​

Returns AppSetting[key] if exists otherwise defaultValue

View Source​
Declaration
public static string GetAppSetting(string key, string defaultValue)
Returns​

System.String

Parameters​
TypeName
System.Stringkey
System.StringdefaultValue

GetAppSetting<T>(String, T)​

Returns AppSetting[key] if exists otherwise defaultValue, for non-string values

View Source​
Declaration
public static T GetAppSetting<T>(string key, T defaultValue)
Returns​

<T>

Parameters​
TypeName
System.Stringkey
<T>defaultValue
Type Parameters​
  • T

GetConnectionString(String)​

Gets the connection string.

View Source​
Declaration
public static string GetConnectionString(string key)
Returns​

System.String

Parameters​
TypeName
System.Stringkey

GetListFromAppSetting(String)​

Gets the list from app setting.

View Source​
Declaration
public static List<string> GetListFromAppSetting(string key)
Returns​

System.Collections.Generic.List<System.String>

Parameters​
TypeName
System.Stringkey

GetListFromAppSettingValue(String)​

View Source​
Declaration
public static List<string> GetListFromAppSettingValue(string appSettingValue)
Returns​

System.Collections.Generic.List<System.String>

Parameters​
TypeName
System.StringappSettingValue

GetDictionaryFromAppSetting(String)​

Gets the dictionary from app setting.

View Source​
Declaration
public static Dictionary<string, string> GetDictionaryFromAppSetting(string key)
Returns​

System.Collections.Generic.Dictionary<System.String,System.String>

Parameters​
TypeName
System.Stringkey

GetDictionaryFromAppSettingValue(String)​

View Source​
Declaration
public static Dictionary<string, string> GetDictionaryFromAppSettingValue(string appSettingValue)
Returns​

System.Collections.Generic.Dictionary<System.String,System.String>

Parameters​
TypeName
System.StringappSettingValue

GetKeyValuePairsFromAppSettingValue(String)​

View Source​
Declaration
public static List<KeyValuePair<string, string>> GetKeyValuePairsFromAppSettingValue(string appSettingValue)
Returns​

System.Collections.Generic.List<System.Collections.Generic.KeyValuePair<System.String,System.String>>

Parameters​
TypeName
System.StringappSettingValue

GetAppSettingsMap()​

View Source​
Declaration
public static Dictionary<string, string> GetAppSettingsMap()
Returns​

System.Collections.Generic.Dictionary<System.String,System.String>