HostBuilder.ConfigureAppConfiguration(Action<HostBuilderContext,IConfigurationBuilder>) Yöntem

Tanım

Yapı işleminin ve uygulamanın geri kalanı için yapılandırmayı ayarlar.Sets up the configuration for the remainder of the build process and application. Geçilen,, Configuration çağrılardan oluşturulan ana bilgisayarın yapılandırması ConfigureHostConfiguration(Action<IConfigurationBuilder>) .The Configuration passed in is the host's configuration built from calls to ConfigureHostConfiguration(Action<IConfigurationBuilder>). Bu, birden çok kez çağrılabilir ve sonuçlar eklenebilir olur.This can be called multiple times and the results will be additive. Tüm çağrılar işlendikten sonra, Configuration gelecekteki derleme adımları için sonuçlarla güncelleştirilir.After all calls have been processed, Configuration will be updated with the results for future build steps. Elde edilen yapılandırma de Services dı kapsayıcısında kullanılabilir olacaktır.The resulting configuration will also be available in the Services DI Container.

public:
 virtual Microsoft::Extensions::Hosting::IHostBuilder ^ ConfigureAppConfiguration(Action<Microsoft::Extensions::Hosting::HostBuilderContext ^, Microsoft::Extensions::Configuration::IConfigurationBuilder ^> ^ configureDelegate);
public Microsoft.Extensions.Hosting.IHostBuilder ConfigureAppConfiguration (Action<Microsoft.Extensions.Hosting.HostBuilderContext,Microsoft.Extensions.Configuration.IConfigurationBuilder> configureDelegate);
abstract member ConfigureAppConfiguration : Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
override this.ConfigureAppConfiguration : Action<Microsoft.Extensions.Hosting.HostBuilderContext, Microsoft.Extensions.Configuration.IConfigurationBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Function ConfigureAppConfiguration (configureDelegate As Action(Of HostBuilderContext, IConfigurationBuilder)) As IHostBuilder

Parametreler

configureDelegate
Action<HostBuilderContext,IConfigurationBuilder>

Uygulamasını yapılandırmak için, IConfigurationBuilder uygulamayı oluşturmak için kullanılacak temsilci IConfiguration .The delegate for configuring the IConfigurationBuilder that will be used to construct the IConfiguration for the application.

Döndürülenler

IHostBuilder

IHostBuilderZincirleme için aynı örneği.The same instance of the IHostBuilder for chaining.

Uygulamalar

Şunlara uygulanır