FakeHostingExtensions.Configure 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
透過 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 執行個體。
備註
設計為藉由定義一般組態方法,簡化單元測試中的主機組態。