private Notification(SafetyNews safetyNews, NotificationType notificationType) { if (safetyNews == null) { throw new ArgumentNullException(); } DateTime = DateTime.Now; SafetyNews = safetyNews; Type = notificationType; }
public static Notification NewSafetyNews(SafetyNews safetyNews) { return(new Notification(safetyNews, NotificationType.SafetyNewsPosted)); }