internal static void TimerTick(DateTime now, NotificationFrequency freq)
{
switch (freq)
{
case NotificationFrequency.Immediately: if (!Configuration.ImmediatelyEnabled)
{
return;
}
break;
case NotificationFrequency.Daily: if (!Configuration.DailyEnabled)
{
return;
}
break;
case NotificationFrequency.Weekly: if (!Configuration.WeeklyEnabled)
{
return;
}
break;
case NotificationFrequency.Monthly: if (!Configuration.MonthlyEnabled)
{
return;
}
break;
default: throw GetUnknownFrequencyException(freq);
}
if (now >= LastProcessTime.GetNextTime(freq, now))
{
GenerateMessages(freq, now);
}
}