public static IHealthChecksBuilder AddSqlServers( this IHealthChecksBuilder builder, AcuWebSites acuWebSites, TimeSpan?timeout = null) { return(acuWebSites.Aggregate(builder, (current, acuWebSite) => current.AddSqlServer(name: $"Sql [{acuWebSite.Name}]", connectionString: acuWebSite.ConnectionString, tags: new List <string> { "sql", acuWebSite.Name }, timeout: timeout))); }
public static IHealthChecksBuilder AddActiveUsers( this IHealthChecksBuilder builder, AcuWebSites acuWebSites, TimeSpan?timeout = null) { return(acuWebSites.Aggregate(builder, (current, acuWebSite) => current.AddCheck(name: $"Users [{acuWebSite.Name}]", instance: new ActiveUsersChecker(acuWebSite), tags: new List <string> { "users", acuWebSite.Name }, timeout: timeout))); }
public static IHealthChecksBuilder AddUrls( this IHealthChecksBuilder builder, AcuWebSites acuWebSites, TimeSpan?timeout = null) { return(acuWebSites.Aggregate(builder, (current, acuWebSite) => current.AddUrlGroup(name: $"Url [{acuWebSite.Name}]", uri: new Uri(acuWebSite.Url), tags: new List <string> { "url", acuWebSite.Name }, timeout: timeout))); }