public RepeatTrigger(TimeSpan?timeInterval, DateTime time, int?frequency = null)
 {
     if (timeInterval != null)
     {
         this.timeInterval = (TimeSpan)timeInterval;
     }
     else
     {
         this.timeInterval = new TimeSpan(0, 0, 1);
     }
     this.singleTimeLimiter = new SingleTimeLimiter(time);
     if (frequency != null)
     {
         this.numberLimiter = new NumberLimiter((int)frequency);
     }
 }
        public RepeatTrigger(TimeSpan?timeInterval, DateTime?startTime = null, DateTime?stopTime = null, int?frequency = 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 (frequency != null)
            {
                this.numberLimiter = new NumberLimiter((int)frequency);
            }
        }