public static HealthCheckBuilder AddSqlServerCheck(this HealthCheckBuilder builder, IConfiguration configuration) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } var options = new SqlServerCheckOptions(); configuration.Bind(options); return(builder.AddSqlServerCheck(options)); }
public static HealthCheckBuilder AddSqlServerCheck(this HealthCheckBuilder builder, SqlServerCheckOptions options) { if (builder == null) { throw new ArgumentNullException(nameof(builder)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } var settings = new SqlServerCheckSettings(options.Name, options.Critical, options.Frequency, options.Tags, options.ConnectionString); return(builder.AddSqlServerCheck(settings)); }