Пример #1
0
 public void GrantBenefit(Visitor visitor, IVisitorHistoryRepository historyService, IPromotionCodeGenerator generator)
 {
     Require.IsTrue(IsActive, "Promotion is not active");
     if (ReceiveCondition.IsSatisfiedFor(visitor, historyService))
     {
         Benefit.ApplyFor(visitor, generator);
         DomainEventBus.Current.Raise(new PromotionGrantedForVisitor(Id, visitor.Id));
     }
 }
 public void GenerateFreeEntryPromoCodeForVisitor(Visitor visitor, Movie movie)
 {
 }
 public void GeneratePremierePromoCodeFor(Visitor visitor)
 {
 }
 public void GenerateDiscountFor(Visitor visitor, Percentage discount)
 {
 }
 public bool HasWatchedMovies(Visitor visitor, List<MovieToWatch> moviesToWatch)
 {
     return true;
 }
 public bool HasWatchedAnyMovie(Visitor visitor, DateTime dayToWatch)
 {
     return true;
 }
 public bool HasAttendedPremiere(Visitor visitor, ValidityRange validityRange, int requiredCount)
 {
     return true;
 }
Пример #8
0
 public abstract void ApplyFor(Visitor visitor, IPromotionCodeGenerator generator);