Example #1
0
        public static string GetHumanizedSchedule(SnapshotRule rule)
        {
            string descriptorCron = GenerateCron(rule, true);

            string expr = ExpressionDescriptor.GetDescription(descriptorCron);

            if (rule.IsExcludingDayRange())
            {
                rule.GetExcludingDayRange(out DateTime from, out DateTime to);

                expr += String.Format(", Excluding from {0} to {1}",
                                      from.ToShortTimeString(),
                                      to.ToShortTimeString()
                                      );
            }

            return(expr);
        }
Example #2
0
 public static bool HasCalendar(this SnapshotRule rule)
 {
     return(rule.IsExcludingDayRange());
 }