Compartilhar via


HubConnection Construtores

Definição

Sobrecargas

HubConnection(IConnectionFactory, IHubProtocol, ILoggerFactory)

Inicializa uma nova instância da classe HubConnection.

HubConnection(IConnectionFactory, IHubProtocol, IServiceProvider, ILoggerFactory)

Inicializa uma nova instância da classe HubConnection.

HubConnection(IConnectionFactory, IHubProtocol, EndPoint, IServiceProvider, ILoggerFactory)

Inicializa uma nova instância da classe HubConnection.

HubConnection(IConnectionFactory, IHubProtocol, EndPoint, IServiceProvider, ILoggerFactory, IRetryPolicy)

Inicializa uma nova instância da classe HubConnection.

HubConnection(IConnectionFactory, IHubProtocol, ILoggerFactory)

Origem:
HubConnection.cs
Origem:
HubConnection.cs

Inicializa uma nova instância da classe HubConnection.

public:
 HubConnection(Microsoft::AspNetCore::SignalR::Client::IConnectionFactory ^ connectionFactory, Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol ^ protocol, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public HubConnection (Microsoft.AspNetCore.SignalR.Client.IConnectionFactory connectionFactory, Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol protocol, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.SignalR.Client.HubConnection : Microsoft.AspNetCore.SignalR.Client.IConnectionFactory * Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.SignalR.Client.HubConnection
Public Sub New (connectionFactory As IConnectionFactory, protocol As IHubProtocol, loggerFactory As ILoggerFactory)

Parâmetros

connectionFactory
IConnectionFactory

O IConnectionFactory usado para criar uma conexão sempre StartAsync(CancellationToken) que é chamado.

protocol
IHubProtocol

O IHubProtocol usado pela conexão.

loggerFactory
ILoggerFactory

A fábrica do agente.

Aplica-se a

HubConnection(IConnectionFactory, IHubProtocol, IServiceProvider, ILoggerFactory)

Origem:
HubConnection.cs
Origem:
HubConnection.cs

Inicializa uma nova instância da classe HubConnection.

public:
 HubConnection(Microsoft::AspNetCore::SignalR::Client::IConnectionFactory ^ connectionFactory, Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol ^ protocol, IServiceProvider ^ serviceProvider, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public HubConnection (Microsoft.AspNetCore.SignalR.Client.IConnectionFactory connectionFactory, Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol protocol, IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.SignalR.Client.HubConnection : Microsoft.AspNetCore.SignalR.Client.IConnectionFactory * Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol * IServiceProvider * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.SignalR.Client.HubConnection
Public Sub New (connectionFactory As IConnectionFactory, protocol As IHubProtocol, serviceProvider As IServiceProvider, loggerFactory As ILoggerFactory)

Parâmetros

connectionFactory
IConnectionFactory

O IConnectionFactory usado para criar uma conexão sempre StartAsync(CancellationToken) que é chamado.

protocol
IHubProtocol

O IHubProtocol usado pela conexão.

serviceProvider
IServiceProvider

Um IServiceProvider que contém os serviços fornecidos a essa HubConnection instância.

loggerFactory
ILoggerFactory

A fábrica do agente.

Comentários

O IServiceProvider usado para inicializar a conexão será descartado quando a conexão for descartada.

Aplica-se a

HubConnection(IConnectionFactory, IHubProtocol, EndPoint, IServiceProvider, ILoggerFactory)

Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs

Inicializa uma nova instância da classe HubConnection.

public:
 HubConnection(Microsoft::AspNetCore::Connections::IConnectionFactory ^ connectionFactory, Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol ^ protocol, System::Net::EndPoint ^ endPoint, IServiceProvider ^ serviceProvider, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public HubConnection (Microsoft.AspNetCore.Connections.IConnectionFactory connectionFactory, Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol protocol, System.Net.EndPoint endPoint, IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.SignalR.Client.HubConnection : Microsoft.AspNetCore.Connections.IConnectionFactory * Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol * System.Net.EndPoint * IServiceProvider * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.SignalR.Client.HubConnection
Public Sub New (connectionFactory As IConnectionFactory, protocol As IHubProtocol, endPoint As EndPoint, serviceProvider As IServiceProvider, loggerFactory As ILoggerFactory)

Parâmetros

connectionFactory
IConnectionFactory

O IConnectionFactory usado para criar uma conexão sempre StartAsync(CancellationToken) que é chamado.

protocol
IHubProtocol

O IHubProtocol usado pela conexão.

endPoint
EndPoint

O EndPoint ao qual se conectar.

serviceProvider
IServiceProvider

Um IServiceProvider que contém os serviços fornecidos a essa HubConnection instância.

loggerFactory
ILoggerFactory

A fábrica do agente.

Comentários

O IServiceProvider usado para inicializar a conexão será descartado quando a conexão for descartada.

Aplica-se a

HubConnection(IConnectionFactory, IHubProtocol, EndPoint, IServiceProvider, ILoggerFactory, IRetryPolicy)

Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs
Origem:
HubConnection.cs

Inicializa uma nova instância da classe HubConnection.

public:
 HubConnection(Microsoft::AspNetCore::Connections::IConnectionFactory ^ connectionFactory, Microsoft::AspNetCore::SignalR::Protocol::IHubProtocol ^ protocol, System::Net::EndPoint ^ endPoint, IServiceProvider ^ serviceProvider, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, Microsoft::AspNetCore::SignalR::Client::IRetryPolicy ^ reconnectPolicy);
public HubConnection (Microsoft.AspNetCore.Connections.IConnectionFactory connectionFactory, Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol protocol, System.Net.EndPoint endPoint, IServiceProvider serviceProvider, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, Microsoft.AspNetCore.SignalR.Client.IRetryPolicy reconnectPolicy);
new Microsoft.AspNetCore.SignalR.Client.HubConnection : Microsoft.AspNetCore.Connections.IConnectionFactory * Microsoft.AspNetCore.SignalR.Protocol.IHubProtocol * System.Net.EndPoint * IServiceProvider * Microsoft.Extensions.Logging.ILoggerFactory * Microsoft.AspNetCore.SignalR.Client.IRetryPolicy -> Microsoft.AspNetCore.SignalR.Client.HubConnection
Public Sub New (connectionFactory As IConnectionFactory, protocol As IHubProtocol, endPoint As EndPoint, serviceProvider As IServiceProvider, loggerFactory As ILoggerFactory, reconnectPolicy As IRetryPolicy)

Parâmetros

connectionFactory
IConnectionFactory

O IConnectionFactory usado para criar uma conexão sempre StartAsync(CancellationToken) que é chamado.

protocol
IHubProtocol

O IHubProtocol usado pela conexão.

endPoint
EndPoint

O EndPoint ao qual se conectar.

serviceProvider
IServiceProvider

Um IServiceProvider que contém os serviços fornecidos a essa HubConnection instância.

loggerFactory
ILoggerFactory

A fábrica do agente.

reconnectPolicy
IRetryPolicy

O IRetryPolicy que controla o tempo e o número de tentativas de reconexão. O HubConnection não se reconectará se o reconnectPolicy for nulo.

Comentários

O IServiceProvider usado para inicializar a conexão será descartado quando a conexão for descartada.

Aplica-se a