public Notice(DateTime sheduledTime, NoticeType type, EmailAddress email, NoticeActionDelegate noticeAction = null) { this.IsExpirable = false; this.Expires = DateTime.Now.AddMonths(12); if (noticeAction != null) { NoticeAction = noticeAction; } Guid = System.Guid.NewGuid().ToString(); NoticeControlNumber = ""; Data = ""; this.EmailAddress = email; Created = DateTime.Now; Scheduled = sheduledTime; IsTimed = true; NoticeType = type; }
/// <summary> /// Create a Notification /// </summary> /// <param name="sheduledTime">Expiration Date</param> /// <param name="noticeAction">ACtion</param> public Notice(DateTime sheduledTime, NoticeActionDelegate noticeAction = null) { this.IsExpirable = false; this.Expires = DateTime.Now.AddMonths(12); 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; Scheduled = sheduledTime; IsTimed = true; NoticeType = NoticeType.None; }