예제 #1
0
        public void HealthCheck()
        {
            DoSomeWorkOnTheSystem();
            DoSomePreparation();

            double systemHealthLevel = _systemHealthProvider.GetHealth();

            if (systemHealthLevel <= 50)
            {
                _mailSender.SendMailTo("*****@*****.**", "Oulala cépété");
            }

            DoSomeCleanup();
            FinishUp();
        }
예제 #2
0
        public void HealthCheck()
        {
            DoSomeWorkOnTheSystem();
            DoSomePreparation();

            double systemHealthLevel = _systemHealthProvider.GetHealth();

            if (systemHealthLevel <= 90)
            {
                _faxSender.SendFaxTo("0742658235", "Oulala cépété");
            }

            DoSomeCleanup();
            FinishUp();
        }
예제 #3
0
 protected override double GetSystemHealth()
 {
     return(_systemHealthProvider.GetHealth());
 }