Beispiel #1
0
 public RepeatTrigger(TimeSpan?timeInterval, DateTime time, int?frequencyLimit = null)
 {
     if (timeInterval != null)
     {
         this.timeInterval = (TimeSpan)timeInterval;
     }
     else
     {
         this.timeInterval = new TimeSpan(0, 0, 1);
     }
     this.singleTimeLimiter = new SingleTimeLimiter(time);
     if (frequencyLimit != null)
     {
         this.freLimiter = new FrequencyLimiter((int)frequencyLimit);
     }
 }
Beispiel #2
0
        public RepeatTrigger(TimeSpan?timeInterval, DateTime?startTime = null, DateTime?stopTime = null, int?frequencyLimit = null)
        {
            if (timeInterval != null)
            {
                this.timeInterval = (TimeSpan)timeInterval;
            }
            else
            {
                this.timeInterval = new TimeSpan(0, 0, 1);
            }

            if (startTime != null || stopTime != null)
            {
                this.startStopTimeLimiter = new StartStopTimeLimiter(startTime, stopTime);
            }
            if (frequencyLimit != null)
            {
                this.freLimiter = new FrequencyLimiter((int)frequencyLimit);
            }
        }