共用方式為


OptionsConfigurationServiceCollectionExtensions 類別

定義

將組態相關選項服務新增至 DI 容器的擴充方法。

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

方法

Configure<TOptions>(IServiceCollection, IConfiguration)

註冊 TOptions 將要繫結的組態執行個體,並在組態變更時更新選項。

Configure<TOptions>(IServiceCollection, IConfiguration, Action<BinderOptions>)

註冊 TOptions 將繫結的組態執行個體。

Configure<TOptions>(IServiceCollection, String, IConfiguration)

註冊 TOptions 將繫結的組態執行個體。

Configure<TOptions>(IServiceCollection, String, IConfiguration, Action<BinderOptions>)

註冊 TOptions 將繫結的組態執行個體。

適用於