// Token: 0x06000637 RID: 1591 RVA: 0x000125B4 File Offset: 0x000107B4 public static ByteQuantifiedSize GetConfigByteQuantifiedSizeValue(string configName, ByteQuantifiedSize defaultValue) { string expression = null; ByteQuantifiedSize result; if (AppConfigLoader.TryGetConfigRawValue(configName, out expression) && ByteQuantifiedSize.TryParse(expression, out result)) { return(result); } return(defaultValue); }
private static ByteQuantifiedSize GetConfigByteQuantifiedSize(string key, ByteQuantifiedSize defaultValue) { string configurationValue = Configuration.GetConfigurationValue(key); ByteQuantifiedSize byteQuantifiedSize; if (string.IsNullOrEmpty(configurationValue) || !ByteQuantifiedSize.TryParse(configurationValue, out byteQuantifiedSize)) { Configuration.GeneralTracer.TraceDebug <string, ByteQuantifiedSize>(0L, "Config[{0}]: {1} (default)", key, defaultValue); return(defaultValue); } Configuration.GeneralTracer.TraceDebug <string, ByteQuantifiedSize>(0L, "Config[{0}]: {1}", key, byteQuantifiedSize); return(byteQuantifiedSize); }
internal static ByteQuantifiedSize GetByteQuantifiedValueFromMultivaluedProperty(string name, IEnumerable <string> property, ByteQuantifiedSize defaultValue) { string stringValueFromMultivaluedProperty = MultivaluedPropertyAccessors.GetStringValueFromMultivaluedProperty(name, property, null); if (string.IsNullOrEmpty(stringValueFromMultivaluedProperty)) { return(defaultValue); } ByteQuantifiedSize result; if (ByteQuantifiedSize.TryParse(stringValueFromMultivaluedProperty, out result)) { return(result); } return(defaultValue); }
// Token: 0x0600001E RID: 30 RVA: 0x00002480 File Offset: 0x00000680 private static ByteQuantifiedSize GetByteQuantifiedSizeValue(string label, ByteQuantifiedSize defaultValue) { ByteQuantifiedSize result = defaultValue; try { string text = ConfigurationManager.AppSettings[label]; if (string.IsNullOrEmpty(text) || !ByteQuantifiedSize.TryParse(text, out result)) { return(defaultValue); } } catch (ConfigurationErrorsException) { } return(result); }