示例#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 Tuple <RecurrencePattern, List <DateTime> > GetRecurrencePatternAppointments(DateTime startTime, DateTime endTime, string recurrencePatternValue)
        {
            var recurringRuleProcessor = new RecurringRuleProcessor()
            {
                Start = startTime, RecurrencePattern = new RecurrencePattern(recurrencePatternValue)
            };

            return(new Tuple <RecurrencePattern, List <DateTime> >(recurringRuleProcessor.RecurrencePattern, recurringRuleProcessor.GetOccurrences(startTime, endTime).Select(i => i.Period.StartTime.Value).ToList()));
        }
示例#3
0
        public static RecurrencePattern GetRecurrencePattern(DateTime startTime, string recurrencePatternValue)
        {
            var recurringRuleProcessor = new RecurringRuleProcessor()
            {
                Start = startTime, RecurrencePattern = new RecurrencePattern(recurrencePatternValue)
            };

            return(recurringRuleProcessor.RecurrencePattern);
        }
示例#4
0
        public static List <DateTime> GetAppointments(DateTime startTime, DateTime endTime, RecurrencePattern RecurrencePattern)
        {
            var recurringRuleProcessor = new RecurringRuleProcessor()
            {
                Start = startTime, RecurrencePattern = RecurrencePattern
            };

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