/// <summary> /// Called when the internal SignalR client has failed to reconnect. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="ResonanceExceptionEventArgs"/> instance containing the event data.</param> protected virtual void OnError(object sender, ResonanceExceptionEventArgs e) { if (State == ResonanceComponentState.Connected) { OnFailed(e.Exception, "The internal SignalR client has lost the connection and failed to reconnect."); } }
private void OnDiscoveryError(object sender, ResonanceExceptionEventArgs e) { Logger.LogError(e.Exception, $"Discovery stopped due to {e.Exception.Message}"); }
/// <summary> /// Called when the internal SignalR client has disconnected due to some connection error. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="ResonanceExceptionEventArgs"/> instance containing the event data.</param> protected virtual void OnDisconnected(object sender, ResonanceExceptionEventArgs e) { Disconnected?.Invoke(this, e); }
private void _service_Error(object sender, ResonanceExceptionEventArgs e) { Logger.LogError("Service connection lost.", e.Exception); }
/// <summary> /// Called when the internal SignalR client has disconnected with an error. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="ResonanceExceptionEventArgs"/> instance containing the event data.</param> protected virtual void OnError(object sender, ResonanceExceptionEventArgs e) { IsRegistered = false; IsDisposed = false; Error?.Invoke(this, e); }