private HealthData CheckDependency(IHealthDependency dependency) { try { dependency.OnDependencyException += (o, e) => { OnDependencyException?.Invoke(this, e); }; return(dependency.CheckHealth()); } catch (Exception ex) { OnDependencyException?.Invoke(this, new DependencyExceptionEvent(ex)); throw; } }
public void AddDependency(IHealthDependency dependency) { _healthDependencyCollection.Add(dependency); }
public void AddDependency(IHealthDependency dependency) { _logger.Debug($"Adding health dependency to {_appName}."); _healthDependencyCollection.Add(dependency); _logger.Debug($"Health dependency added to {_appName}."); }