共用方式為


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 表示非同步停止。

適用於