IWebHost
ServerFeatures
Services
Start()
StartAsync(CancellationToken)
StopAsync(CancellationToken)
GetTestClient(IWebHost)
GetTestServer(IWebHost)
Run(IWebHost)
RunAsService(IWebHost)
RunAsync(IWebHost, CancellationToken)
StopAsync(IWebHost, TimeSpan)
WaitForShutdown(IWebHost)
WaitForShutdownAsync(IWebHost, CancellationToken)
net10.0
namespace Microsoft.AspNetCore.TestHost
{
public static class WebHostBuilderExtensions
{
[Obsolete("IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008.", DiagnosticId = "ASPDEPR008", UrlFormat = "https://aka.ms/aspnet/deprecate/008")]
public static TestServer! GetTestServer(this IWebHost! host);
}
}
| .NET | 10.0 |
|---|---|
Information specific to net10.0 | |
| Assembly | Microsoft.AspNetCore.TestHost , Version=10.0.2.0, PublicKeyToken=adb9793829ddae60 |
| Referencing | Your project needs a package reference to |
| Package | Microsoft.AspNetCore.TestHost (10.0.2) net10.0 |
| Obsolete | ASPDEPR008: IWebHost is obsolete. Use IHost instead. For more information, visit https://aka.ms/aspnet/deprecate/008. |
| Platform Restrictions | This API is supported on all platforms. |
- Built-in API
- Package-provided API