public string GetExecute(string name)
        {
            AnetHealthCheckRegistry registry = new AnetHealthCheckRegistry();
            registry.LoadRegistry();

            return registry.RegisteredHealthChecks[name].Execute().HealthStatus.ToString();
        }
        public AnetHealthCheck Get(string name)
        {
            AnetHealthCheckRegistry registry = new AnetHealthCheckRegistry();
            registry.LoadRegistry();

            return registry.RegisteredHealthChecks[name];
        }
 public void GetAll()
 {
     AnetHealthCheckRegistry tester = new AnetHealthCheckRegistry();
     HealthChecksController controller = new HealthChecksController();
     tester = controller.Get();
     Assert.AreEqual("AuthXHealthCheck", tester.RegisteredHealthChecks["axhc"].Name);
     Assert.AreEqual("DBHealthCheck", tester.RegisteredHealthChecks["dbhc"].Name);
     Assert.AreEqual("WSHealthCheck", tester.RegisteredHealthChecks["wshc"].Name);
 }
        public Dictionary<string, string> GetExecute()
        {
            AnetHealthCheckRegistry registry = new AnetHealthCheckRegistry();
            registry.LoadRegistry();
            Dictionary<string, string> result = new Dictionary<string, string>();
            foreach (KeyValuePair<string, AnetHealthCheck> entry in registry.RegisteredHealthChecks)
            {
                result.Add(entry.Key, entry.Value.Execute().HealthStatus.ToString());
            }

            return result;
        }
 /// <summary>
 /// Retrieves the information of all registered health checks.
 /// </summary>
 /// <returns>Information of all registered health checks</returns>
 /// GET api/healthchecks
 public AnetHealthCheckRegistry Get()
 {
     AnetHealthCheckRegistry registry = new AnetHealthCheckRegistry();
     registry.LoadRegistry();
     return registry;
 }