共用方式為


OptionsConfigurationServiceCollectionExtensions.Configure 方法

定義

多載

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 將系結的組態實例。

Configure<TOptions>(IServiceCollection, IConfiguration)

來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs

註冊 TOptions 將系結的組態實例。

public:
generic <typename TOptions>
 where TOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfiguration ^ config);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, config As IConfiguration) As IServiceCollection

類型參數

TOptions

正在設定的選項類型。

參數

services
IServiceCollection

要加入服務的 IServiceCollection

config
IConfiguration

正在系結的組態。

傳回

IServiceCollection,以便鏈結其他呼叫。

適用於

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

來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs

註冊 TOptions 將系結的組態實例。

public:
generic <typename TOptions>
 where TOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Microsoft::Extensions::Configuration::IConfiguration ^ config, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureBinder);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.Extensions.Configuration.IConfiguration config, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureBinder) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, config As IConfiguration, configureBinder As Action(Of BinderOptions)) As IServiceCollection

類型參數

TOptions

正在設定的選項類型。

參數

services
IServiceCollection

要加入服務的 IServiceCollection

config
IConfiguration

正在系結的組態。

configureBinder
Action<BinderOptions>

用來設定 BinderOptions

傳回

IServiceCollection,以便鏈結其他呼叫。

適用於

Configure<TOptions>(IServiceCollection, String, IConfiguration)

來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs

註冊 TOptions 將系結的組態實例。

public:
generic <typename TOptions>
 where TOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Microsoft::Extensions::Configuration::IConfiguration ^ config);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string? name, Microsoft.Extensions.Configuration.IConfiguration config) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Microsoft.Extensions.Configuration.IConfiguration -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, name As String, config As IConfiguration) As IServiceCollection

類型參數

TOptions

正在設定的選項類型。

參數

services
IServiceCollection

要加入服務的 IServiceCollection

name
String

選項實例的名稱。

config
IConfiguration

正在系結的組態。

傳回

IServiceCollection,以便鏈結其他呼叫。

適用於

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

來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs
來源:
OptionsConfigurationServiceCollectionExtensions.cs

註冊 TOptions 將系結的組態實例。

public:
generic <typename TOptions>
 where TOptions : class[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ Configure(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name, Microsoft::Extensions::Configuration::IConfiguration ^ config, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureBinder);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection Configure<TOptions> (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string? name, Microsoft.Extensions.Configuration.IConfiguration config, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureBinder) where TOptions : class;
static member Configure : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection (requires 'Options : null)
<Extension()>
Public Function Configure(Of TOptions As Class) (services As IServiceCollection, name As String, config As IConfiguration, configureBinder As Action(Of BinderOptions)) As IServiceCollection

類型參數

TOptions

正在設定的選項類型。

參數

services
IServiceCollection

要加入服務的 IServiceCollection

name
String

選項實例的名稱。

config
IConfiguration

正在系結的組態。

configureBinder
Action<BinderOptions>

用來設定 BinderOptions

傳回

IServiceCollection,以便鏈結其他呼叫。

適用於