HubConnectionContext 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
HubConnectionContext(ConnectionContext, HubConnectionContextOptions, ILoggerFactory)
- Source:
- HubConnectionContext.cs
初始化 HubConnectionContext 类的新实例。
public:
HubConnectionContext(Microsoft::AspNetCore::Connections::ConnectionContext ^ connectionContext, Microsoft::AspNetCore::SignalR::HubConnectionContextOptions ^ contextOptions, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public HubConnectionContext (Microsoft.AspNetCore.Connections.ConnectionContext connectionContext, Microsoft.AspNetCore.SignalR.HubConnectionContextOptions contextOptions, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.SignalR.HubConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext * Microsoft.AspNetCore.SignalR.HubConnectionContextOptions * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.SignalR.HubConnectionContext
Public Sub New (connectionContext As ConnectionContext, contextOptions As HubConnectionContextOptions, loggerFactory As ILoggerFactory)
参数
- connectionContext
- ConnectionContext
- contextOptions
- HubConnectionContextOptions
用于配置 HubConnectionContext 的选项。
- loggerFactory
- ILoggerFactory
记录器工厂。
适用于
HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory)
- Source:
- HubConnectionContext.cs
- Source:
- HubConnectionContext.cs
初始化 HubConnectionContext 类的新实例。
public:
HubConnectionContext(Microsoft::AspNetCore::Connections::ConnectionContext ^ connectionContext, TimeSpan keepAliveInterval, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public HubConnectionContext (Microsoft.AspNetCore.Connections.ConnectionContext connectionContext, TimeSpan keepAliveInterval, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.SignalR.HubConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext * TimeSpan * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.SignalR.HubConnectionContext
Public Sub New (connectionContext As ConnectionContext, keepAliveInterval As TimeSpan, loggerFactory As ILoggerFactory)
参数
- connectionContext
- ConnectionContext
- keepAliveInterval
- TimeSpan
保持活动状态的间隔。 如果服务器在此时间间隔内未发送任何消息,则将发送 Ping 消息。
- loggerFactory
- ILoggerFactory
记录器工厂。
适用于
HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory, TimeSpan)
- Source:
- HubConnectionContext.cs
初始化 HubConnectionContext 类的新实例。
public:
HubConnectionContext(Microsoft::AspNetCore::Connections::ConnectionContext ^ connectionContext, TimeSpan keepAliveInterval, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, TimeSpan clientTimeoutInterval);
public HubConnectionContext (Microsoft.AspNetCore.Connections.ConnectionContext connectionContext, TimeSpan keepAliveInterval, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, TimeSpan clientTimeoutInterval);
new Microsoft.AspNetCore.SignalR.HubConnectionContext : Microsoft.AspNetCore.Connections.ConnectionContext * TimeSpan * Microsoft.Extensions.Logging.ILoggerFactory * TimeSpan -> Microsoft.AspNetCore.SignalR.HubConnectionContext
Public Sub New (connectionContext As ConnectionContext, keepAliveInterval As TimeSpan, loggerFactory As ILoggerFactory, clientTimeoutInterval As TimeSpan)
参数
- connectionContext
- ConnectionContext
- keepAliveInterval
- TimeSpan
保持活动状态的间隔。 如果服务器在此时间间隔内未发送任何消息,则将发送 Ping 消息。
- loggerFactory
- ILoggerFactory
记录器工厂。
- clientTimeoutInterval
- TimeSpan
我们在此间隔内未听到的客户端假定已断开连接。