src/Kros.AspNetCore/Extensions/ConfigurationBuilderExtenstions.cs
/// <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>
Adds the azure application configuration.
Adds the azure application configuration .
public static IConfigurationBuilder AddAzureAppConfig(
            this IConfigurationBuilder config,
            HostBuilderContext hostingContext,
            Action<AzureAppConfigurationRefreshOptions> refreshConfiguration = null)
            => config.AddAzureAppConfig(hostingContext.HostingEnvironment.EnvironmentName, refreshConfiguration);
public static IConfigurationBuilder AddAzureAppConfig ( this IConfigurationBuilder config , HostBuilderContext hostingContext , Action < AzureAppConfigurationRefreshOptions > refreshConfiguration = null ) => config . AddAzureAppConfig ( hostingContext . HostingEnvironment . EnvironmentName , refreshConfiguration ) ;
Adds the azure application configuration.
Adds the azure application configuration .
The same instance of the Microsoft.Extensions.Hosting.IHostBuilder for chaining.
The same instance of the Microsoft . Extensions . Hosting . IHostBuilder for chaining .
IConfigurationBuilder
this
hostingContext
HostBuilderContext
The hosting context.
The hosting context .
refreshConfiguration
Action<AzureAppConfigurationRefreshOptions>
A callback used to configure Azure App Configuration refresh options.
A callback used to configure Azure App Configuration refresh options .
config
None
remarks
Configuration should contain AppConfig class.
Configuration should contain AppConfig class .