public EmailOptions() { EmailAddress = string.Empty; CoolDown = new EmailCooldown(1); StartTime = new DateTime(2020, 1, 1, 0, 0, 0); // the value is a place holder so the first occurs EndTime = new DateTime(2020, 1, 1, 0, 0, 0); // the value is a place holder so the first occurs DaysOfWeek = new bool[7]; SizeDownToPercent = 100; }
public EmailOptions(string emailAddress, int coolDown) { EmailAddress = emailAddress; CoolDown = new EmailCooldown(coolDown); StartTime = new DateTime(2020, 1, 1, 0, 0, 0); // the value is a place holder so the first occurs EndTime = new DateTime(2020, 1, 1, 0, 0, 0); // the value is a place holder so the first occurs. DaysOfWeek = new bool[7]; SizeDownToPercent = 100; }
public EmailCooldown(EmailCooldown src) { CooldownTime = src.CooldownTime; LastSent = src.LastSent - TimeSpan.FromHours(2); // make it far in the past to ensure the first trigger }