コード例 #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
ファイル: Meetup.cs プロジェクト: sundeepkamath/DevMeetups
        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));
 }