HostingExtensions.UseHost 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| UseHost(CommandLineConfiguration, Action<IHostBuilder>) | |
| UseHost(CommandLineConfiguration, Func<String[],IHostBuilder>, Action<IHostBuilder>) |
UseHost(CommandLineConfiguration, Action<IHostBuilder>)
- Source:
- HostingExtensions.cs
public static System.CommandLine.CommandLineConfiguration UseHost(this System.CommandLine.CommandLineConfiguration config, Action<Microsoft.Extensions.Hosting.IHostBuilder> configureHost = default);
static member UseHost : System.CommandLine.CommandLineConfiguration * Action<Microsoft.Extensions.Hosting.IHostBuilder> -> System.CommandLine.CommandLineConfiguration
<Extension()>
Public Function UseHost (config As CommandLineConfiguration, Optional configureHost As Action(Of IHostBuilder) = Nothing) As CommandLineConfiguration
参数
- config
- System.CommandLine.CommandLineConfiguration
- configureHost
- Action<IHostBuilder>
返回
System.CommandLine.CommandLineConfiguration
适用于
UseHost(CommandLineConfiguration, Func<String[],IHostBuilder>, Action<IHostBuilder>)
- Source:
- HostingExtensions.cs
public static System.CommandLine.CommandLineConfiguration UseHost(this System.CommandLine.CommandLineConfiguration config, Func<string[],Microsoft.Extensions.Hosting.IHostBuilder> hostBuilderFactory, Action<Microsoft.Extensions.Hosting.IHostBuilder> configureHost = default);
static member UseHost : System.CommandLine.CommandLineConfiguration * Func<string[], Microsoft.Extensions.Hosting.IHostBuilder> * Action<Microsoft.Extensions.Hosting.IHostBuilder> -> System.CommandLine.CommandLineConfiguration
<Extension()>
Public Function UseHost (config As CommandLineConfiguration, hostBuilderFactory As Func(Of String(), IHostBuilder), Optional configureHost As Action(Of IHostBuilder) = Nothing) As CommandLineConfiguration
参数
- config
- System.CommandLine.CommandLineConfiguration
- hostBuilderFactory
- Func<String[],IHostBuilder>
- configureHost
- Action<IHostBuilder>
返回
System.CommandLine.CommandLineConfiguration