HostingAbstractionsWebHostBuilderExtensions.UseServer 方法

定义

指定 Web 主机要使用的服务器。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ UseServer(Microsoft::AspNetCore::Hosting::IWebHostBuilder ^ hostBuilder, Microsoft::AspNetCore::Hosting::Server::IServer ^ server);
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseServer (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder, Microsoft.AspNetCore.Hosting.Server.IServer server);
static member UseServer : Microsoft.AspNetCore.Hosting.IWebHostBuilder * Microsoft.AspNetCore.Hosting.Server.IServer -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseServer (hostBuilder As IWebHostBuilder, server As IServer) As IWebHostBuilder

参数

hostBuilder
IWebHostBuilder

要配置的 IWebHostBuilder

server
IServer

要使用的 IServer

返回

IWebHostBuilder

适用于