예제 #1
0
        public static List <Occurrence> GetOccurrences(DateTime startTime, DateTime endTime, string recurrencePatternValue)
        {
            var recurringRuleProcessor = new RecurringRuleProcessor()
            {
                Start = startTime, RecurrencePattern = new RecurrencePattern(recurrencePatternValue)
            };

            return(recurringRuleProcessor.GetOccurrences(startTime, endTime).ToList());
        }
예제 #2
0
        public static List <DateTime> GetAppointments(DateTime startTime, DateTime endTime, string recurrencePatternValue)
        {
            var recurringRuleProcessor = new RecurringRuleProcessor()
            {
                Start = startTime, RecurrencePattern = new RecurrencePattern(recurrencePatternValue)
            };

            return(recurringRuleProcessor.GetOccurrences(startTime, endTime).Select(i => i.Period.StartTime.Value).ToList());
        }