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

指示是否应中止服务器启动。

返回

实现

适用于