OptionsBuilder<TOptions>(IServiceCollection, String) 构造函数

定义

构造函数。Constructor.

public:
 OptionsBuilder(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, System::String ^ name);
public OptionsBuilder (Microsoft.Extensions.DependencyInjection.IServiceCollection services, string name);
new Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)> : Microsoft.Extensions.DependencyInjection.IServiceCollection * string -> Microsoft.Extensions.Options.OptionsBuilder<'Options (requires 'Options : null)>
Public Sub New (services As IServiceCollection, name As String)

参数

services
IServiceCollection

正在配置的选项的 IServiceCollectionThe IServiceCollection for the options being configured.

name
String

如果使用 null DefaultName,则为 TOptions 实例的默认名称。The default name of the TOptions instance, if null DefaultName is used.

适用于