共用方式為


KestrelServer.StartAsync<TContext> 方法

定義

使用應用程式啟動伺服器。

public:
generic <typename TContext>
 virtual System::Threading::Tasks::Task ^ StartAsync(Microsoft::AspNetCore::Hosting::Server::IHttpApplication<TContext> ^ application, System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task StartAsync<TContext> (Microsoft.AspNetCore.Hosting.Server.IHttpApplication<TContext> application, System.Threading.CancellationToken cancellationToken);
abstract member StartAsync : Microsoft.AspNetCore.Hosting.Server.IHttpApplication<'Context> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StartAsync : Microsoft.AspNetCore.Hosting.Server.IHttpApplication<'Context> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function StartAsync(Of TContext) (application As IHttpApplication(Of TContext), cancellationToken As CancellationToken) As Task

類型參數

TContext

與應用程式相關聯的內容。

參數

cancellationToken
CancellationToken

指出是否應該中止伺服器啟動。

傳回

實作

適用於