/// <summary> /// Dispatches the <code>RecoveryInitiated</code> /// </summary> /// <param name="eventArgs">Event arguments</param> public void InvokeRecoveryInitiated(RecoveryInitiatedEventArgs eventArgs) { if (RecoveryInitiated == null) { Log.LogDebug("Cannot invoke RecoveryInitiated because no event listeners are attached to associated event handler."); return; } var stopwatch = Stopwatch.StartNew(); try { RecoveryInitiated(this, eventArgs); stopwatch.Stop(); Log.LogInformation($"Successfully called RecoveryInitiated event. Duration: {stopwatch.ElapsedMilliseconds} ms."); } catch (Exception ex) { stopwatch.Stop(); Log.LogWarning($"Event handler throw an exception while invoking RecoveryInitiated. Exception: {ex.Message}", ex); } }
private void OnRecoveryInitiated(object sender, RecoveryInitiatedEventArgs e) { RecoveryInitiated?.Invoke(this, e); }