Beispiel #1
0
        /// <summary>
        /// Adds a SQL Server check
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="connectionString"></param>
        /// <returns></returns>
        public static DependenciesConfiguration AddSqlConnectionCheck(this DependenciesConfiguration configuration, string connectionString)
        {
            var c = new SqlConnectionCheck(configuration.Services.GetRequiredService <ILogger <SqlConnectionCheck> >(), connectionString);

            return(configuration.Add(c));
        }
Beispiel #2
0
        /// <summary>
        /// Adds a TCP connection check
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="host"></param>
        /// <param name="port"></param>
        /// <returns></returns>
        public static DependenciesConfiguration AddTcpCheck(this DependenciesConfiguration configuration, string host, int port)
        {
            var c = new TcpCheck(configuration.Services.GetRequiredService <ILogger <TcpCheck> >(), host, port);

            return(configuration.Add(c));
        }