Class PlaceholderResolverExtensions
- Namespace
- Steeltoe.Extensions.Configuration.Placeholder
- Assembly
- Steeltoe.Extensions.Configuration.PlaceholderCore.dll
public static class PlaceholderResolverExtensions
- Inheritance
-
PlaceholderResolverExtensions
- Inherited Members
Methods
AddPlaceholderResolver(IWebHostBuilder, ILoggerFactory)
Add a placeholder resolver configuration source to the ConfigurationBuilder. The placeholder resolver source will capture and wrap all the existing sources IConfigurationSource contained in the builder. The newly created source will then replace the existing sources and provide placeholder resolution for the configuration. Typically you will want to add this configuration source as the last one so that you wrap all of the applications configuration sources with place holder resolution.
public static IWebHostBuilder AddPlaceholderResolver(this IWebHostBuilder hostBuilder, ILoggerFactory loggerFactory = null)
Parameters
hostBuilder
IWebHostBuilderthe host builder
loggerFactory
ILoggerFactorythe log factory to use
Returns
- IWebHostBuilder
provided host builder
AddPlaceholderResolver(IHostBuilder, ILoggerFactory)
Add a placeholder resolver configuration source to the ConfigurationBuilder. The placeholder resolver source will capture and wrap all the existing sources IConfigurationSource contained in the builder. The newly created source will then replace the existing sources and provide placeholder resolution for the configuration. Typically you will want to add this configuration source as the last one so that you wrap all of the applications configuration sources with place holder resolution.
public static IHostBuilder AddPlaceholderResolver(this IHostBuilder hostBuilder, ILoggerFactory loggerFactory = null)
Parameters
hostBuilder
IHostBuilderthe host builder
loggerFactory
ILoggerFactorythe log factory to use
Returns
- IHostBuilder
provided host builder
ConfigurePlaceholderResolver(IServiceCollection, IConfiguration, ILoggerFactory)
Create a new IConfiguration using a PlaceholderResolverProvider which wraps the provided IConfiguration. The new configuration will then be used to replace the current IConfiguration in the service container. All subsequent requests for a IConfiguration will return the newly created one providing placeholder resolution.
public static IConfiguration ConfigurePlaceholderResolver(this IServiceCollection services, IConfiguration configuration, ILoggerFactory loggerFactory = null)
Parameters
services
IServiceCollectionthe current service container
configuration
IConfigurationthe configuration the placeholder resolver will wrap
loggerFactory
ILoggerFactorythe log factory to use
Returns
- IConfiguration
the new configuration