private static void ServiceStatusChanged(object sender, ServiceChangedEventArgs e) { if (e.OldState != e.NewState) { Log.Information($"Service {e.Service.FriendlyName} has changed state to {e.Service.State}."); Log.Information($"Service {e.Service.FriendlyName} degrated at {e.Service.DegradedState} at {e.Service.DegradedPercentage} % severity."); } CalculateDegratedSettings(); }
protected virtual void OnServiceStateChanged(ServiceChangedEventArgs e) => ServiceStateChanged?.Invoke(this, e);