public static Notification MeetupUpdated(Meetup newMeetup, DateTime originalDateTime, string originalVenue) { var notification = new Notification(NotificationType.MeetupUpdated, newMeetup); // Be sure that OriginalDateTime and OriginalVenue properties have private setters to prevent them // from being changed. They can only be changed when the right factory method is called. notification.OriginalDateTime = originalDateTime; notification.OriginalVenue = originalVenue; return notification; }
public UserNotification(ApplicationUser user, Notification notification) { if (user == null) { throw new ArgumentNullException("user"); } if (notification == null) { throw new ArgumentNullException("notification"); } User = user; Notification = notification; }
public void Notify(Notification notification) { UserNotifications.Add(new UserNotification(this, notification)); }