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