public override int GetHashCode()
 {
     unchecked
     {
         return(((CronTemplate != null ? CronTemplate.GetHashCode() : 0) * 397) ^ (Time != null ? Time.GetHashCode() : 0));
     }
 }
Example #2
0
        private static CronTime GetNextCronTime(DateTime dateTime, CronTemplate template)
        {
            var cronTime = new CronTime(template, dateTime);

            if (cronTime.DateTime.Value == dateTime)
            {
                cronTime = cronTime.GetNext();
            }
            return(cronTime);
        }
Example #3
0
 public ToValidCronTimeTests()
 {
     _template = new CronTemplateBuilder()
                 .WithSeconds(10, 30)
                 .WithMinutes(10, 30, 50)
                 .WithHours(6, 12, 18)
                 .WithDaysOfMonth(5, 15, 25)
                 .WithMonths(3, 6, 9)
                 .WithAllDaysOfWeek()
                 .Build();
 }
Example #4
0
 public CronTimeStreamSimple(CronTemplate template, DateTime datetime)
 {
     _cronTime = new CronTime(template, datetime, forceToValidCronTime: false);
 }