DeleteOldEvents() static private method

static private DeleteOldEvents ( System.DateTime now ) : void
now System.DateTime
return void
Ejemplo n.º 1
0
        private static void Cleanup(NotificationFrequency freq, DateTime now)
        {
            switch (freq)
            {
            case NotificationFrequency.Immediately:
                if (Configuration.DailyEnabled || Configuration.WeeklyEnabled || Configuration.MonthlyEnabled)
                {
                    return;
                }
                break;

            case NotificationFrequency.Daily:
                if (Configuration.WeeklyEnabled || Configuration.MonthlyEnabled)
                {
                    return;
                }
                break;

            case NotificationFrequency.Weekly:
                if (Configuration.MonthlyEnabled)
                {
                    return;
                }
                break;

            case NotificationFrequency.Monthly:
                break;

            default:
                throw GetUnknownFrequencyException(freq);
            }
            Event.DeleteOldEvents(now);
        }