예제 #1
0
        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;
            }
        }
예제 #2
0
 public void AddDependency(IHealthDependency dependency)
 {
     _healthDependencyCollection.Add(dependency);
 }
예제 #3
0
 public void AddDependency(IHealthDependency dependency)
 {
     _logger.Debug($"Adding health dependency to {_appName}.");
     _healthDependencyCollection.Add(dependency);
     _logger.Debug($"Health dependency added to {_appName}.");
 }