HubConnection.StopAsync(CancellationToken) 方法

定义

停止与服务器的连接。

public System.Threading.Tasks.Task StopAsync (System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task StopAsync (System.Threading.CancellationToken cancellationToken = default);
member this.StopAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
abstract member StopAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StopAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function StopAsync (Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overridable Function StopAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

参数

cancellationToken
CancellationToken

要监视取消请求的标记。 默认值是 None

返回

一个 Task ,它表示异步停止。

适用于