コード例 #1
0
 public void Given()
 {
     myConfig = new TwentyFourSevenTimerConfig
                    {
                        Monday = "12:34:56,12:34:56,00:00:01"
                    };
     myTimer = new TwentyFourSevenTimer(myConfig);
 }
コード例 #2
0
        public TwentyFourSevenTimer(TwentyFourSevenTimerConfig config, INow time)
        {
            myTimeReference = time;
            myConfig = config;

            Alarms = ParseConfig();
            LastAlarmTriggered = myTimeReference.Now();
        }
コード例 #3
0
        public TwentyFourSevenTimer(TwentyFourSevenTimerConfig config, INow time)
        {
            myTimeReference = time;
            myConfig        = config;

            Alarms             = ParseConfig();
            LastAlarmTriggered = myTimeReference.Now();
        }
コード例 #4
0
 public void Given()
 {
     myConfig = new TwentyFourSevenTimerConfig
                    {
                        Weekend = "12:34:56,00:00:01",
                        Saturday = "00:00:02",
                        Sunday = "00:00:03"
                    };
     myTimer = new TwentyFourSevenTimer(myConfig);
 }
コード例 #5
0
 public void Given()
 {
     myConfig = new TwentyFourSevenTimerConfig
     {
         Everyday = "00:00:01,00:00:02,00:00:03,00:00:04,00:00:05,00:01:01,00:02:01"
     };
     myTimer = new TwentyFourSevenTimer(myConfig,
         new FakeNow(DateTime.Now.SetTimeOfDay(0,0,2)));
     Thread.Sleep(5000);
     myTriggeredAlarms = myTimer.Triggered();
 }
コード例 #6
0
 public TwentyFourSevenTimer(TwentyFourSevenTimerConfig config)
     : this(config, new RealNow())
 {
 }
コード例 #7
0
 public TwentyFourSevenTimer(TwentyFourSevenTimerConfig config)
     : this(config, new RealNow())
 {
 }