public static T GetValue <T>(this IAppConfigurationRoot configuration, string key, string tenant, T defaultValue)
        {
            if (string.IsNullOrEmpty(tenant))
            {
                // Return the "global" setting

                return(configuration.GetValue(key, defaultValue));
            }

            // Try to get the tenant setting

            string tenantKey = AppConfigurationPath.Combine(tenant, key);

            if (configuration.AllKeys.Contains(tenantKey))
            {
                return(configuration.GetValue(tenantKey, defaultValue));
            }

            // Default to "global" setting

            return(configuration.GetValue(key, defaultValue));
        }
 public static T GetValue <T>(this IAppConfigurationRoot configuration, string key, string tenant)
 {
     return(configuration.GetValue(key, tenant, default(T)));
 }
 public static string GetValue(this IAppConfigurationRoot appConfig, string key, string tenant)
 {
     return(appConfig.GetValue <string>(key, tenant));
 }