Esempio n. 1
0
 private Notification(Gigs gigs, NotificationType notificationType, DateTime orginalDateTime, string orginalVenue)
 {
     DateTime        = DateTime.Now;
     Gigs            = gigs ?? throw new ArgumentNullException(nameof(gigs));
     OrginalDateTime = orginalDateTime;
     OrginalVenue    = orginalVenue;
     Type            = notificationType;
 }
Esempio n. 2
0
        public static Notification GigUpdate(Gigs newgig, DateTime orginalDateTime, string orginalVenue)
        {
            var notification = new Notification(newgig, NotificationType.GigCreate)
            {
                OrginalDateTime = orginalDateTime,
                OrginalVenue    = orginalVenue
            };

            return(notification);
        }
Esempio n. 3
0
 public static Notification GigCancel(Gigs gigs)
 {
     return(new Notification(gigs, NotificationType.GigCanceled));
 }
Esempio n. 4
0
 public static Notification GigCreate(Gigs gigs)
 {
     return(new Notification(gigs, NotificationType.GigCreate));
 }
Esempio n. 5
0
 public Notification(Gigs gigs, NotificationType notificationType)
 {
     DateTime = DateTime.Now;
     Gigs     = gigs ?? throw new ArgumentNullException(nameof(gigs));
     Type     = notificationType;
 }
Esempio n. 6
0
 public void Attending(Gig gig)
 {
     Gigs.Add(gig);
 }
Esempio n. 7
0
 //It is better to have this in a repository.
 public bool IsAttending(int gigId)
 {
     return(Gigs.Any(g => g.Id == gigId));
 }
Esempio n. 8
0
 public void NotAttending(Gig gig)
 {
     Gigs.Remove(gig);
 }