public static Notification MeetupUpdated(Meetup newMeetup, DateTime originalDateTime, string originalVenue) { var notification = new Notification(newMeetup, NotificationType.MeetupUpdated); notification.OriginalDateTime = originalDateTime; notification.OriginalVenue = originalVenue; return(notification); }
private Notification(Meetup meetup, NotificationType notificationType) { if (meetup == null) { throw new ArgumentNullException("meetup"); } Meetup = meetup; NotificationType = notificationType; DateTime = DateTime.Now; }
internal void Update(Meetup newMeetup) { var notification = Notification.MeetupUpdated(this, DateTime, Venue); Topic = newMeetup.Topic; Venue = newMeetup.Venue; Category = newMeetup.Category; DateTime = newMeetup.DateTime; foreach (var attendee in Attendances.Select(a => a.Attendee)) { attendee.Notify(notification); } }
public static Notification MeetupCancelled(Meetup meetup) { return(new Notification(meetup, NotificationType.MeetupCancelled)); }
public static Notification MeetupCreated(Meetup meetup) { return(new Notification(meetup, NotificationType.MeetupAdded)); }