OptionsBuilderConfigurationExtensions 類別

定義

透過 OptionsBuilder<TOptions> 將組態相關選項服務新增至 DI 容器的擴充方法。Extension methods for adding configuration related options services to the DI container via OptionsBuilder<TOptions>.

public ref class OptionsBuilderConfigurationExtensions abstract sealed
public static class OptionsBuilderConfigurationExtensions
type OptionsBuilderConfigurationExtensions = class
Public Module OptionsBuilderConfigurationExtensions
繼承
OptionsBuilderConfigurationExtensions

方法

Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration)

註冊 TOptions 將繫結的組態執行個體。Registers a configuration instance which TOptions will bind against.

Bind<TOptions>(OptionsBuilder<TOptions>, IConfiguration, Action<BinderOptions>)

註冊 TOptions 將繫結的組態執行個體。Registers a configuration instance which TOptions will bind against.

BindConfiguration<TOptions>(OptionsBuilder<TOptions>, String, Action<BinderOptions>)

註冊相依性插入容器,將 TOptions 繫結至從 DI 服務提供者取得的 IConfigurationRegisters the dependency injection container to bind TOptions against the IConfiguration obtained from the DI service provider.

適用於