共用方式為


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

適用於