Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

HubConnectionContext Constructors

Definition

Namespace:
Microsoft.AspNetCore.SignalR
Assembly:
Microsoft.AspNetCore.SignalR.Core.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.App.Ref v3.0.1
Package:
Microsoft.AspNetCore.App.Ref v3.1.10
Package:
Microsoft.AspNetCore.App.Ref v5.0.0
Package:
Microsoft.AspNetCore.App.Ref v6.0.36
Package:
Microsoft.AspNetCore.App.Ref v7.0.5
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Package:
Microsoft.AspNetCore.SignalR.Core v1.0.0
Package:
Microsoft.AspNetCore.SignalR.Core v1.1.0

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Overloads

HubConnectionContext(ConnectionContext, HubConnectionContextOptions, ILoggerFactory)

Source:
HubConnectionContext.cs

Initializes a new instance of the HubConnectionContext class.

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)

Parameters

connectionContext
ConnectionContext

The underlying ConnectionContext.

contextOptions
HubConnectionContextOptions

The options to configure the HubConnectionContext.

loggerFactory
ILoggerFactory

The logger factory.

Applies to

HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory)

Source:
HubConnectionContext.cs
Source:
HubConnectionContext.cs

Initializes a new instance of the HubConnectionContext class.

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)

Parameters

connectionContext
ConnectionContext

The underlying ConnectionContext.

keepAliveInterval
TimeSpan

The keep alive interval. If no messages are sent by the server in this interval, a Ping message will be sent.

loggerFactory
ILoggerFactory

The logger factory.

Applies to

HubConnectionContext(ConnectionContext, TimeSpan, ILoggerFactory, TimeSpan)

Source:
HubConnectionContext.cs

Initializes a new instance of the HubConnectionContext class.

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)

Parameters

connectionContext
ConnectionContext

The underlying ConnectionContext.

keepAliveInterval
TimeSpan

The keep alive interval. If no messages are sent by the server in this interval, a Ping message will be sent.

loggerFactory
ILoggerFactory

The logger factory.

clientTimeoutInterval
TimeSpan

Clients we haven't heard from in this interval are assumed to have disconnected.

Applies to


Feedback

Was this page helpful?