public static string GetValueOrDefault(string key, string defaultValue = null) { string ret = null; var configurator = new AppSettingConfigurator(); if (configurator != null) { ret = configurator.GetCurrent()?.Get(key); } if (ret == null) { ret = ConfigurationManager.AppSettings[key]; } return(!string.IsNullOrEmpty(ret) ? ret : defaultValue); }
public static IConfiguration GetEndointWebServiceGE(this IConfiguration configuration) { configuration.Put(EndpointWebServiceGE, AppSettingConfigurator.GetValueOrDefault("endpointWebServiceGE")); return(configuration); }
public static string GetCacherPath(this IConfiguration configuration) { return(AppSettingConfigurator.GetValueOrDefault("mov3r:CacherPath")); }