Exemplo n.º 1
0
        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;
        }
Exemplo n.º 2
0
        public UserNotification(ApplicationUser user, Notification notification)
        {
            if (user == null)
            {
                throw new ArgumentNullException("user");
            }

            if (notification == null)
            {
                throw new ArgumentNullException("notification");
            }
            User = user;
            Notification = notification;
        }
Exemplo n.º 3
0
 public void Notify(Notification notification)
 {
     UserNotifications.Add(new UserNotification(this, notification));
 }