Beispiel #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="Result" /> struct.
 /// </summary>
 /// <param name="name">A descriptive name for the health check</param>
 /// <param name="check">The result of executing a health check.</param>
 public Result(string name, HealthCheckResult check)
 {
     Name  = name;
     Check = check;
 }
Beispiel #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="HealthCheck" /> class.
 /// </summary>
 /// <param name="name">A descriptive name for the health check.</param>
 /// <param name="check">A function returning a message that is a healthy result.</param>
 public HealthCheck(string name, Func <Task <string> > check)
     : this(name, async() => HealthCheckResult.Healthy(await check()))
 {
 }