FakeHost.CreateBuilder 方法

定义

重载

CreateBuilder()

创建 的实例 IHostBuilder 以配置和生成主机。

CreateBuilder(FakeHostOptions)

创建 的实例 IHostBuilder 以配置和生成主机。

CreateBuilder(Action<FakeHostOptions>)

创建 的实例 IHostBuilder 以配置和生成主机。

CreateBuilder()

Source:
FakeHost.cs

创建 的实例 IHostBuilder 以配置和生成主机。

public:
 static Microsoft::Extensions::Hosting::IHostBuilder ^ CreateBuilder();
public static Microsoft.Extensions.Hosting.IHostBuilder CreateBuilder ();
static member CreateBuilder : unit -> Microsoft.Extensions.Hosting.IHostBuilder
Public Shared Function CreateBuilder () As IHostBuilder

返回

IHostBuilder 的一个实例。

适用于

CreateBuilder(FakeHostOptions)

Source:
FakeHost.cs

创建 的实例 IHostBuilder 以配置和生成主机。

public:
 static Microsoft::Extensions::Hosting::IHostBuilder ^ CreateBuilder(Microsoft::Extensions::Hosting::Testing::FakeHostOptions ^ options);
public static Microsoft.Extensions.Hosting.IHostBuilder CreateBuilder (Microsoft.Extensions.Hosting.Testing.FakeHostOptions options);
static member CreateBuilder : Microsoft.Extensions.Hosting.Testing.FakeHostOptions -> Microsoft.Extensions.Hosting.IHostBuilder
Public Shared Function CreateBuilder (options As FakeHostOptions) As IHostBuilder

参数

options
FakeHostOptions

一个 FakeHostOptions 实例。

返回

IHostBuilder 的一个实例。

适用于

CreateBuilder(Action<FakeHostOptions>)

Source:
FakeHost.cs

创建 的实例 IHostBuilder 以配置和生成主机。

public:
 static Microsoft::Extensions::Hosting::IHostBuilder ^ CreateBuilder(Action<Microsoft::Extensions::Hosting::Testing::FakeHostOptions ^> ^ configure);
public static Microsoft.Extensions.Hosting.IHostBuilder CreateBuilder (Action<Microsoft.Extensions.Hosting.Testing.FakeHostOptions> configure);
static member CreateBuilder : Action<Microsoft.Extensions.Hosting.Testing.FakeHostOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
Public Shared Function CreateBuilder (configure As Action(Of FakeHostOptions)) As IHostBuilder

参数

configure
Action<FakeHostOptions>

用于配置实例的选项 FakeHostOptions

返回

IHostBuilder 的一个实例。

适用于