示例#1
0
 /// <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");
     }
 }
示例#2
0
 /// <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);
 }
示例#3
0
 /// <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);
 }