Esempio n. 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());
        }
Esempio n. 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()));
        }
Esempio n. 3
0
        public static RecurrencePattern GetRecurrencePattern(DateTime startTime, string recurrencePatternValue)
        {
            var recurringRuleProcessor = new RecurringRuleProcessor()
            {
                Start = startTime, RecurrencePattern = new RecurrencePattern(recurrencePatternValue)
            };

            return(recurringRuleProcessor.RecurrencePattern);
        }
Esempio n. 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());
        }