HubConnectionBuilderExtensions.WithAutomaticReconnect Metodo

Definizione

Overload

WithAutomaticReconnect(IHubConnectionBuilder)

Configura per HubConnection tentare automaticamente la riconnessione se la connessione viene persa. Il client attenderà rispettivamente il valore predefinito 0, 2, 10 e 30 secondi prima di provare fino a quattro tentativi di riconnessione.

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Configura per HubConnection tentare automaticamente la riconnessione se la connessione viene persa.

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Configura per HubConnection tentare automaticamente la riconnessione se la connessione viene persa.

WithAutomaticReconnect(IHubConnectionBuilder)

Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs

Configura per HubConnection tentare automaticamente la riconnessione se la connessione viene persa. Il client attenderà rispettivamente il valore predefinito 0, 2, 10 e 30 secondi prima di provare fino a quattro tentativi di riconnessione.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ WithAutomaticReconnect(Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ hubConnectionBuilder);
public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithAutomaticReconnect (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder);
static member WithAutomaticReconnect : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithAutomaticReconnect (hubConnectionBuilder As IHubConnectionBuilder) As IHubConnectionBuilder

Parametri

hubConnectionBuilder
IHubConnectionBuilder

Oggetto IHubConnectionBuilder da configurare.

Restituisce

Stessa istanza di IHubConnectionBuilder per il concatenamento.

Si applica a

WithAutomaticReconnect(IHubConnectionBuilder, IRetryPolicy)

Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs

Configura per HubConnection tentare automaticamente la riconnessione se la connessione viene persa.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ WithAutomaticReconnect(Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ hubConnectionBuilder, Microsoft::AspNetCore::SignalR::Client::IRetryPolicy ^ retryPolicy);
public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithAutomaticReconnect (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder, Microsoft.AspNetCore.SignalR.Client.IRetryPolicy retryPolicy);
static member WithAutomaticReconnect : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder * Microsoft.AspNetCore.SignalR.Client.IRetryPolicy -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithAutomaticReconnect (hubConnectionBuilder As IHubConnectionBuilder, retryPolicy As IRetryPolicy) As IHubConnectionBuilder

Parametri

hubConnectionBuilder
IHubConnectionBuilder

Oggetto IHubConnectionBuilder da configurare.

retryPolicy
IRetryPolicy

Oggetto IRetryPolicy che controlla l'intervallo e il numero di tentativi di riconnessione.

Restituisce

Stessa istanza di IHubConnectionBuilder per il concatenamento.

Si applica a

WithAutomaticReconnect(IHubConnectionBuilder, TimeSpan[])

Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs
Origine:
HubConnectionBuilderExtensions.cs

Configura per HubConnection tentare automaticamente la riconnessione se la connessione viene persa.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ WithAutomaticReconnect(Microsoft::AspNetCore::SignalR::Client::IHubConnectionBuilder ^ hubConnectionBuilder, cli::array <TimeSpan> ^ reconnectDelays);
public static Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder WithAutomaticReconnect (this Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder hubConnectionBuilder, TimeSpan[] reconnectDelays);
static member WithAutomaticReconnect : Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder * TimeSpan[] -> Microsoft.AspNetCore.SignalR.Client.IHubConnectionBuilder
<Extension()>
Public Function WithAutomaticReconnect (hubConnectionBuilder As IHubConnectionBuilder, reconnectDelays As TimeSpan()) As IHubConnectionBuilder

Parametri

hubConnectionBuilder
IHubConnectionBuilder

Oggetto IHubConnectionBuilder da configurare.

reconnectDelays
TimeSpan[]

Matrice contenente i ritardi prima di provare ogni tentativo di riconnessione. La lunghezza della matrice rappresenta il numero di tentativi di riconnessione non riusciti eseguiti prima che il client interrompa il tentativo di riconnessione.

Restituisce

Stessa istanza di IHubConnectionBuilder per il concatenamento.

Si applica a