SenseNet.Messaging.NotificationHandler.Cleanup C# (CSharp) Method

Cleanup() private static method

private static Cleanup ( NotificationFrequency freq, System.DateTime now ) : void
freq NotificationFrequency
now System.DateTime
return void
        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);
        }