/// <summary> /// Adds the azure application configuration. /// </summary> /// <param name="config">The configuration.</param> /// <param name="hostingContext">The hosting context.</param> /// <param name="refreshConfiguration">A callback used to configure Azure App Configuration refresh options.</param> /// <returns>The same instance of the Microsoft.Extensions.Hosting.IHostBuilder for chaining.</returns> /// <remarks> /// Configuration should contain <b>AppConfig</b> section, which is mapped to <see cref="AppConfigOptions "/> class. /// </remarks> public static IConfigurationBuilder AddAzureAppConfig( this IConfigurationBuilder config, HostBuilderContext hostingContext, Action <AzureAppConfigurationRefreshOptions> refreshConfiguration = null) => config.AddAzureAppConfig(hostingContext.HostingEnvironment.EnvironmentName, refreshConfiguration);
/// <summary> /// Adds the azure application configuration. /// </summary> /// <param name="config">The configuration.</param> /// <param name="hostingContext">The hosting context.</param> /// <remarks> /// Configuration should contain attributes AppConfig:Endpoint and AppConfig:Settings. /// </remarks> public static IConfigurationBuilder AddAzureAppConfiguration( this IConfigurationBuilder config, HostBuilderContext hostingContext) => config.AddAzureAppConfig(hostingContext.HostingEnvironment.EnvironmentName);