TestServer 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
TestServer(IWebHostBuilder) |
用於 IWebHostBuilder。 |
TestServer(IServiceProvider) |
用於 IHostBuilder。 |
TestServer(IWebHostBuilder, IFeatureCollection) |
用於 IWebHostBuilder。 |
TestServer(IServiceProvider, IFeatureCollection) |
用於 IHostBuilder。 |
TestServer(IServiceProvider, IOptions<TestServerOptions>) |
用於 IHostBuilder。 |
TestServer(IServiceProvider, IFeatureCollection, IOptions<TestServerOptions>) |
用於 IHostBuilder。 |
TestServer(IWebHostBuilder)
用於 IWebHostBuilder。
public:
TestServer(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ builder);
public TestServer (Microsoft.AspNetCore.Hosting.IWebHostBuilder builder);
new Microsoft.AspNetCore.TestHost.TestServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.TestHost.TestServer
Public Sub New (builder As IWebHostBuilder)
參數
- builder
- IWebHostBuilder
適用於
TestServer(IServiceProvider)
用於 IHostBuilder。
public:
TestServer(IServiceProvider ^ services);
public TestServer (IServiceProvider services);
new Microsoft.AspNetCore.TestHost.TestServer : IServiceProvider -> Microsoft.AspNetCore.TestHost.TestServer
Public Sub New (services As IServiceProvider)
參數
- services
- IServiceProvider
適用於
TestServer(IWebHostBuilder, IFeatureCollection)
用於 IWebHostBuilder。
public:
TestServer(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ builder, Microsoft::AspNetCore::Http::Features::IFeatureCollection ^ featureCollection);
public TestServer (Microsoft.AspNetCore.Hosting.IWebHostBuilder builder, Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection);
new Microsoft.AspNetCore.TestHost.TestServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Microsoft.AspNetCore.Http.Features.IFeatureCollection -> Microsoft.AspNetCore.TestHost.TestServer
Public Sub New (builder As IWebHostBuilder, featureCollection As IFeatureCollection)
參數
- builder
- IWebHostBuilder
- featureCollection
- IFeatureCollection
適用於
TestServer(IServiceProvider, IFeatureCollection)
用於 IHostBuilder。
public:
TestServer(IServiceProvider ^ services, Microsoft::AspNetCore::Http::Features::IFeatureCollection ^ featureCollection);
public TestServer (IServiceProvider services, Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection);
new Microsoft.AspNetCore.TestHost.TestServer : IServiceProvider * Microsoft.AspNetCore.Http.Features.IFeatureCollection -> Microsoft.AspNetCore.TestHost.TestServer
Public Sub New (services As IServiceProvider, featureCollection As IFeatureCollection)
參數
- services
- IServiceProvider
- featureCollection
- IFeatureCollection
適用於
TestServer(IServiceProvider, IOptions<TestServerOptions>)
用於 IHostBuilder。
public TestServer (IServiceProvider services, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.TestHost.TestServerOptions> optionsAccessor);
new Microsoft.AspNetCore.TestHost.TestServer : IServiceProvider * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.TestHost.TestServerOptions> -> Microsoft.AspNetCore.TestHost.TestServer
Public Sub New (services As IServiceProvider, optionsAccessor As IOptions(Of TestServerOptions))
參數
- services
- IServiceProvider
- optionsAccessor
- IOptions<TestServerOptions>
適用於
TestServer(IServiceProvider, IFeatureCollection, IOptions<TestServerOptions>)
用於 IHostBuilder。
public TestServer (IServiceProvider services, Microsoft.AspNetCore.Http.Features.IFeatureCollection featureCollection, Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.TestHost.TestServerOptions> optionsAccessor);
new Microsoft.AspNetCore.TestHost.TestServer : IServiceProvider * Microsoft.AspNetCore.Http.Features.IFeatureCollection * Microsoft.Extensions.Options.IOptions<Microsoft.AspNetCore.TestHost.TestServerOptions> -> Microsoft.AspNetCore.TestHost.TestServer
Public Sub New (services As IServiceProvider, featureCollection As IFeatureCollection, optionsAccessor As IOptions(Of TestServerOptions))
參數
- services
- IServiceProvider
- featureCollection
- IFeatureCollection
- optionsAccessor
- IOptions<TestServerOptions>