Share via


HubConnectionBuilderExtensions 类

定义

IHubConnectionBuilder 的扩展方法。

public ref class HubConnectionBuilderExtensions abstract sealed
public static class HubConnectionBuilderExtensions
type HubConnectionBuilderExtensions = class
Public Module HubConnectionBuilderExtensions
继承
HubConnectionBuilderExtensions

方法

ConfigureLogging(IHubConnectionBuilder, Action<ILoggingBuilder>)

添加一个委托来配置提供的 ILoggingBuilder。 这可多次进行调用。

WithAutomaticReconnect(IHubConnectionBuilder)

HubConnection 配置为在连接丢失时自动尝试重新连接。 客户端将分别等待默认的 0、2、10 和 30 秒,然后再尝试最多四次重新连接。

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

HubConnection 配置为在连接丢失时自动尝试重新连接。

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

HubConnection 配置为在连接丢失时自动尝试重新连接。

WithKeepAliveInterval(IHubConnectionBuilder, TimeSpan)

HubConnection配置 KeepAliveInterval。

WithServerTimeout(IHubConnectionBuilder, TimeSpan)

HubConnection配置 ServerTimeout。

适用于