Пример #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));
 }