共用方式為


HubConnectionContext 建構函式

定義

多載

HubConnectionContext(ConnectionContext, HubConnectionContextOptions, ILoggerFactory)

初始化 HubConnectionContext 類別的新執行個體。

HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory)

初始化 HubConnectionContext 類別的新執行個體。

HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory, TimeSpan)

初始化 HubConnectionContext 類別的新執行個體。

HubConnectionContext(ConnectionContext, HubConnectionContextOptions, ILoggerFactory)

來源:
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

基礎 ConnectionContext

contextOptions
HubConnectionContextOptions

設定 HubConnectionCoNtext 的選項。

loggerFactory
ILoggerFactory

記錄器工廠。

適用於

HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory)

來源:
HubConnectionContext.cs
來源:
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

基礎 ConnectionContext

keepAliveInterval
TimeSpan

存留時間間隔。 如果伺服器在此間隔內未傳送任何訊息,則會傳送 Ping 訊息。

loggerFactory
ILoggerFactory

記錄器工廠。

適用於

HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory, TimeSpan)

來源:
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

基礎 ConnectionContext

keepAliveInterval
TimeSpan

存留時間間隔。 如果伺服器在此間隔內未傳送任何訊息,則會傳送 Ping 訊息。

loggerFactory
ILoggerFactory

記錄器工廠。

clientTimeoutInterval
TimeSpan

我們在此間隔中未聽到的用戶端會假設已中斷連線。

適用於