共用方式為


HubConnectionBuilderExtensions.WithKeepAliveInterval 方法

定義

設定 的 KeepAliveInterval HubConnection

public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithKeepAliveInterval (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder, TimeSpan interval);
static member WithKeepAliveInterval : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder * TimeSpan -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithKeepAliveInterval (hubConnectionBuilder As IHubConnectionBuilder, interval As TimeSpan) As IHubConnectionBuilder

參數

hubConnectionBuilder
IHubConnectionBuilder

要設定的 IHubConnectionBuilder

interval
TimeSpan

的 KeepAliveInterval。 HubConnection

傳回

用於鏈結的相同 IHubConnectionBuilder 執行個體。

適用於