public RecurrenceDescriptor() { Seconds = new SecondsDescriptorPart("*"); Minutes = new MinutesDescriptorPart("*"); Hours = new HoursDescriptorPart("*"); DaysOfMonth = new DayOfMonthDescriptorPart("*"); Months = new MonthDescriptorPart("*"); DaysOfWeek = new DayOfWeekDescriptorPart("*"); Years = new YearDescriptorPart("*"); }
public RecurrenceDescriptor(string seconds, string minutes, string hours, string daysOfMonth, string months, string daysOfWeek, string years) { Seconds = new SecondsDescriptorPart(seconds); Minutes = new MinutesDescriptorPart(minutes); Hours = new HoursDescriptorPart(hours); DaysOfMonth = new DayOfMonthDescriptorPart(daysOfMonth); Months = new MonthDescriptorPart(months); DaysOfWeek = new DayOfWeekDescriptorPart(daysOfWeek); Years = new YearDescriptorPart(years); }
public RecurrenceDescriptor(string rd) { var parts = rd.Split(); if (parts.Length != 7) { throw new Exception("Invalid recurrence descriptor format"); } Seconds = new SecondsDescriptorPart(parts[0]); Minutes = new MinutesDescriptorPart(parts[1]); Hours = new HoursDescriptorPart(parts[2]); DaysOfMonth = new DayOfMonthDescriptorPart(parts[3]); Months = new MonthDescriptorPart(parts[4]); DaysOfWeek = new DayOfWeekDescriptorPart(parts[5]); Years = new YearDescriptorPart(parts[6]); }