예제 #1
0
        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);
        }
예제 #2
0
        private Notification(Meetup meetup, NotificationType notificationType)
        {
            if (meetup == null)
            {
                throw new ArgumentNullException("meetup");
            }

            Meetup           = meetup;
            NotificationType = notificationType;
            DateTime         = DateTime.Now;
        }
예제 #3
0
        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);
            }
        }
예제 #4
0
 public static Notification MeetupCancelled(Meetup meetup)
 {
     return(new Notification(meetup, NotificationType.MeetupCancelled));
 }
예제 #5
0
 public static Notification MeetupCreated(Meetup meetup)
 {
     return(new Notification(meetup, NotificationType.MeetupAdded));
 }