共用方式為


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 執行個體。

備註

設計為藉由定義一般組態方法,簡化單元測試中的主機組態。

適用於