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
Type | Name |
---|---|
System.String | key |
GetAppSetting(String)
Gets the app setting.
View Source
Declaration
public static string GetAppSetting(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
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
Type | Name |
---|---|
System.String | key |
System.String | defaultValue |
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
Type | Name |
---|---|
System.String | key |
<T> | defaultValue |
Type Parameters
T
GetConnectionString(String)
Gets the connection string.
View Source
Declaration
public static string GetConnectionString(string key)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | key |
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
Type | Name |
---|---|
System.String | key |
GetListFromAppSettingValue(String)
View Source
Declaration
public static List<string> GetListFromAppSettingValue(string appSettingValue)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
System.String | appSettingValue |
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
Type | Name |
---|---|
System.String | key |
GetDictionaryFromAppSettingValue(String)
View Source
Declaration
public static Dictionary<string, string> GetDictionaryFromAppSettingValue(string appSettingValue)
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
Parameters
Type | Name |
---|---|
System.String | appSettingValue |
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
Type | Name |
---|---|
System.String | appSettingValue |
GetAppSettingsMap()
View Source
Declaration
public static Dictionary<string, string> GetAppSettingsMap()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>