Exemple #1
0
        public Beeper(
            IBeeperRequirements requirements,
            IBeepRequirements beepRequirements,
            ICountingManualTimer workTimer,
            ICountingManualTimer restTimer)
        {
            this.requirements     = requirements;
            this.beepRequirements = beepRequirements;
            this.workTimer        = workTimer;
            this.restTimer        = restTimer;

            this.workTimer.SetCallback(this.CallBackWork);
            this.restTimer.SetCallback(this.CallBackRest);
        }
Exemple #2
0
 private static void SetCounting(ICountingManualTimer timer, string actionName)
 {
     timer.SetCounting(
         TimeSpan.FromSeconds(1),
         x => Counting(actionName, timer.StartTime, timer.NextCallBackTime));
 }