Exemple #1
0
 public static TimeSpan GetConfigTimeSpanValue(string configName, TimeSpan minValue, TimeSpan maxValue, TimeSpan defaultValue)
 {
     return(AppConfigLoader.GetConfigValue <TimeSpan>(configName, new TimeSpan?(minValue), new TimeSpan?(maxValue), defaultValue, new AppConfigLoader.TryParseValue <TimeSpan>(TimeSpan.TryParse)));
 }
Exemple #2
0
 public static int GetConfigIntValue(string configName, int minValue, int maxValue, int defaultValue)
 {
     return(AppConfigLoader.GetConfigValue <int>(configName, new int?(minValue), new int?(maxValue), defaultValue, new AppConfigLoader.TryParseValue <int>(int.TryParse)));
 }
Exemple #3
0
 public static double GetConfigDoubleValue(string configName, double minValue, double maxValue, double defaultValue)
 {
     return(AppConfigLoader.GetConfigValue <double>(configName, new double?(minValue), new double?(maxValue), defaultValue, new AppConfigLoader.TryParseValue <double>(double.TryParse)));
 }
Exemple #4
0
 public static bool GetConfigBoolValue(string configName, bool defaultValue)
 {
     return(AppConfigLoader.GetConfigValue <bool>(configName, null, null, defaultValue, new AppConfigLoader.TryParseValue <bool>(bool.TryParse)));
 }