Ejemplo n.º 1
0
 public SingleTrigger(DateTime?starTime = null, DateTime?stopTime = null, int tryTimes = 0, TimeSpan?timeInterval = null)
 {
     if (tryTimes > 0)
     {
         this.tryTrigger = new RepeatTrigger(timeInterval, starTime, stopTime, tryTimes);
     }
     else
     {
         this.timeLimiter = new StartStopTimeLimiter(starTime, stopTime);
     }
 }
Ejemplo n.º 2
0
 public SingleTrigger(DateTime time, int tryTimes = 0, TimeSpan?timeInterval = null)
 {
     if (tryTimes > 0)
     {
         this.tryTrigger = new RepeatTrigger(timeInterval, time, tryTimes);
     }
     else
     {
         this.timeLimiter = new SingleTimeLimiter(time);
     }
 }