コード例 #1
0
 /// <summary>
 /// Add a health check for TDengine services.
 /// </summary>
 /// <param name="builder">The <see cref="IHealthChecksBuilder"/>.</param>
 /// <param name="connectionString">The TDengine connection string to be used.</param>
 /// <param name="healthQuery">The query to be executed.Optional. If <c>null</c> select 1 is used.</param>
 /// <param name="name">The health check name. Optional. If <c>null</c> the type name 'TDengine' will be used for the name.</param>
 /// <param name="failureStatus">
 /// The <see cref="HealthStatus"/> that should be reported when the health check fails. Optional. If <c>null</c> then
 /// the default status of <see cref="HealthStatus.Unhealthy"/> will be reported.
 /// </param>
 /// <param name="tags">A list of tags that can be used to filter sets of health checks. Optional.</param>
 /// <param name="timeout">An optional System.TimeSpan representing the timeout of the check.</param>
 /// <returns>The <see cref="IHealthChecksBuilder"/>.</returns>
 public static IHealthChecksBuilder AddTDengine(this IHealthChecksBuilder builder,
                                                string connectionString,
                                                string healthQuery         = default,
                                                string name                = default,
                                                HealthStatus?failureStatus = default,
                                                IEnumerable <string> tags  = default,
                                                TimeSpan?timeout           = default)
 {
     return(builder.AddTDengine(_ => connectionString, healthQuery, name, failureStatus, tags, timeout));
 }