Table of Contents

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 IWebHostBuilder

the host builder

loggerFactory ILoggerFactory

the 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 IHostBuilder

the host builder

loggerFactory ILoggerFactory

the 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 IServiceCollection

the current service container

configuration IConfiguration

the configuration the placeholder resolver will wrap

loggerFactory ILoggerFactory

the log factory to use

Returns

IConfiguration

the new configuration