NamedConfigureFromConfigurationOptions<TOptions> 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
NamedConfigureFromConfigurationOptions<TOptions>(String, IConfiguration)
建構函式,其接受要繫結的 IConfiguration 執行個體。
public:
NamedConfigureFromConfigurationOptions(System::String ^ name, Microsoft::Extensions::Configuration::IConfiguration ^ config);
public NamedConfigureFromConfigurationOptions (string name, Microsoft.Extensions.Configuration.IConfiguration config);
public NamedConfigureFromConfigurationOptions (string? name, Microsoft.Extensions.Configuration.IConfiguration config);
new Microsoft.Extensions.Options.NamedConfigureFromConfigurationOptions<'Options (requires 'Options : null)> : string * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.Options.NamedConfigureFromConfigurationOptions<'Options (requires 'Options : null)>
Public Sub New (name As String, config As IConfiguration)
參數
- name
- String
選項執行個體的名稱。
- config
- IConfiguration
IConfiguration 執行個體。
適用於
NamedConfigureFromConfigurationOptions<TOptions>(String, IConfiguration, Action<BinderOptions>)
建構函式,其接受要繫結的 IConfiguration 執行個體。
public:
NamedConfigureFromConfigurationOptions(System::String ^ name, Microsoft::Extensions::Configuration::IConfiguration ^ config, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureBinder);
public NamedConfigureFromConfigurationOptions (string name, Microsoft.Extensions.Configuration.IConfiguration config, Action<Microsoft.Extensions.Configuration.BinderOptions> configureBinder);
public NamedConfigureFromConfigurationOptions (string? name, Microsoft.Extensions.Configuration.IConfiguration config, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureBinder);
new Microsoft.Extensions.Options.NamedConfigureFromConfigurationOptions<'Options (requires 'Options : null)> : string * Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> Microsoft.Extensions.Options.NamedConfigureFromConfigurationOptions<'Options (requires 'Options : null)>
Public Sub New (name As String, config As IConfiguration, configureBinder As Action(Of BinderOptions))
參數
- name
- String
選項執行個體的名稱。
- config
- IConfiguration
IConfiguration 執行個體。
- configureBinder
- Action<BinderOptions>
用來設定 BinderOptions。