示例#1
0
        /// <summary>
        /// Creates instance list for a selected date, based on crontab rules.
        /// </summary>
        /// <param name="selectedDay">selected date for which instances should be created</param>
        /// <returns>Crontab instance list created for a selected date, based on crontab rules.</returns>
        public CrontabInstanceList GetInstanceList(DateTime selectedDay)
        {
            CrontabInstanceList cil = new CrontabInstanceList();

            foreach (CrontabRule cr in this)
            {
                if (!cr.IsExcluded)
                {
                    //czy tutuj mogą wpadać nulle?
                    cil.AddRange(cr.GetInstanceList(selectedDay));
                }
            }
            cil.SortByTimeDesc();
            return(cil);
        }
示例#2
0
 /// <summary>
 /// Creates default, parser object.
 /// </summary>
 public CrontabRuleParser()
 {
     this.rules     = new CrontabRuleList();
     this.instances = new CrontabInstanceList();
 }