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);
}