예제 #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);
        }
예제 #2
0
 public static bool HasCalendar(this SnapshotRule rule)
 {
     return(rule.IsExcludingDayRange());
 }