private static TimeSpan GetConfigTimeSpan(string label, TimeSpan min, TimeSpan max, TimeSpan defaultValue) { TimeSpan result; try { result = TransportAppConfig.GetConfigValue <TimeSpan>(label, min, max, defaultValue, new TransportAppConfig.TryParse <TimeSpan>(TimeSpan.TryParse)); } catch (ConfigurationErrorsException) { result = defaultValue; } return(result); }
// Token: 0x060000DB RID: 219 RVA: 0x00006AB8 File Offset: 0x00004CB8 public static bool GetConfigBool(string label, bool defaultValue) { bool result; try { result = TransportAppConfig.GetConfigValue <bool>(label, defaultValue, new TransportAppConfig.TryParse <bool>(bool.TryParse)); } catch (ConfigurationErrorsException ex) { LogSearchService.Logger.LogEvent(MSExchangeTransportLogSearchEventLogConstants.Tuple_ErrorReadingAppConfig, DateTime.UtcNow.Hour.ToString(CultureInfo.InvariantCulture), new object[] { ex.ToString() }); result = defaultValue; } return(result); }