public Task(DateTime expires, NoticeType type, EmailAddress email, TaskActionDelegate noticeAction = null) { if (noticeAction != null) { NoticeAction = noticeAction; } Guid = System.Guid.NewGuid().ToString(); NoticeControlNumber = Name = Data = ""; this.EmailAddress = email; Created = DateTime.Now; ScheduledTime = expires; IsTimed = true; NoticeType = type; }
/// <summary> /// Create a Notification /// </summary> /// <param name="expires">Expiration Date</param> /// <param name="noticeAction">ACtion</param> public Task(DateTime expires, TaskActionDelegate noticeAction = null) { if (noticeAction != null) { NoticeAction = noticeAction; } Guid = System.Guid.NewGuid().ToString(); NoticeControlNumber = Name = Data = ""; this.EmailAddress = new EmailAddress(); this.EmailAddress.Name = "null.null"; this.EmailAddress.Email = "*****@*****.**"; Created = DateTime.Now; ScheduledTime = expires; IsTimed = true; NoticeType = NoticeType.None; }