コード例 #1
0
        private void ScheduleFinished(object sender, CakeScheduleEventArgs eventArgs)
        {
            _serviceLogger.Write("Service run: " + DateTime.Now);

            if (eventArgs.CakeRescheduleServiceIsRun)
            {
                _serviceLogger.Write("Cake Schedule Service run: " + DateTime.Now);
            }

            if (eventArgs.MailServiceIsRun)
            {
                _serviceLogger.Write("Mail Service run: " + DateTime.Now);
            }
        }
コード例 #2
0
 private void ScheduleFinished(object sender, CakeScheduleEventArgs eventArgs)
 {
     _finishedEventFired = true;
     _cakeScheduleIsRun = eventArgs.CakeRescheduleServiceIsRun;
     _mailServiceIsRun = eventArgs.MailServiceIsRun;
 }
コード例 #3
0
ファイル: ScheduleWorker.cs プロジェクト: christianbh/Kakeapp
        private void Timer_Elapsed(object sender, ElapsedEventArgs args)
        {
            bool cakeRescheduleIsRun = RunCakeReschedule();
            bool mailServiceIsRun = RunMailService();

            if (CakeScheduleFinished != null)
            {
                var cakeScheduleEventArgs = new CakeScheduleEventArgs
                                                {
                                                    CakeRescheduleServiceIsRun = cakeRescheduleIsRun,
                                                    MailServiceIsRun = mailServiceIsRun
                                                };

                CakeScheduleFinished(this, cakeScheduleEventArgs);
            }
        }