FakeHostingExtensions.Configure 方法

定义

IHostBuilder通过委托公开更改。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ Configure(Microsoft::Extensions::Hosting::IHostBuilder ^ builder, Action<Microsoft::Extensions::Hosting::IHostBuilder ^> ^ configure);
public static Microsoft.Extensions.Hosting.IHostBuilder Configure (this Microsoft.Extensions.Hosting.IHostBuilder builder, Action<Microsoft.Extensions.Hosting.IHostBuilder> configure);
static member Configure : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.IHostBuilder> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function Configure (builder As IHostBuilder, configure As Action(Of IHostBuilder)) As IHostBuilder

参数

builder
IHostBuilder

一个 IHostBuilder 实例。

configure
Action<IHostBuilder>

IHostBuilder配置 实例。

返回

IHostBuilder 实例。

注解

旨在通过定义常见配置方法简化单元测试中的主机配置。

适用于