WebHostBuilderExtensions.UseTestServer 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
UseTestServer(IWebHostBuilder) |
TestServer啟用服務。 |
UseTestServer(IWebHostBuilder, Action<TestServerOptions>) |
TestServer啟用服務。 |
UseTestServer(IWebHostBuilder)
TestServer啟用服務。
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseTestServer(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ builder);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseTestServer (this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder);
static member UseTestServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseTestServer (builder As IWebHostBuilder) As IWebHostBuilder
參數
- builder
- IWebHostBuilder
傳回
適用於
UseTestServer(IWebHostBuilder, Action<TestServerOptions>)
TestServer啟用服務。
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseTestServer (this Microsoft.AspNetCore.Hosting.IWebHostBuilder builder, Action<Microsoft.AspNetCore.TestHost.TestServerOptions> configureOptions);
static member UseTestServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Action<Microsoft.AspNetCore.TestHost.TestServerOptions> -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseTestServer (builder As IWebHostBuilder, configureOptions As Action(Of TestServerOptions)) As IWebHostBuilder
參數
- builder
- IWebHostBuilder
- configureOptions
- Action<TestServerOptions>
設定測試伺服器選項