/// <summary> /// Registers a custom health check. /// </summary> /// <param name="healthCheck">Custom health check to register.</param> public static void RegisterHealthCheck(HealthCheck healthCheck) { if (!checks.TryAdd(healthCheck.Name, healthCheck)) { throw new InvalidOperationException("HealthCheck named " + healthCheck.Name + " already registered"); } }
/// <summary> /// Registers a custom health check. /// </summary> /// <param name="healthCheck">Custom health check to register.</param> public static void RegisterHealthCheck(HealthCheck healthCheck) { checks.TryAdd(healthCheck.Name, healthCheck); }
/// <summary> /// Registers a custom health check. /// </summary> /// <param name="healthCheck">Custom health check to register.</param> public static void RegisterHealthCheck(HealthCheck healthCheck) { registry.RegisterHealthCheck(healthCheck); }