共用方式為


HubConnection.StartAsync(CancellationToken) 方法

定義

啟動與伺服器的連線。

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

參數

cancellationToken
CancellationToken

用來監視是否有取消要求的語彙基元。 預設值是 None

傳回

Task 表示非同步啟動。

適用於