public bool IsSatisfiedBy(Screening screening) { return (screening.GetStartTime().DayOfWeek == m_DayOfWeek && m_StartTime.CompareTo(screening.GetStartTime().ToLocalTime()) <= 0 && m_EndTime.CompareTo(screening.GetStartTime().ToLocalTime()) >= 0); }
public Money CalculateDiscountAmount(Screening screening) { if (m_Conditions is null) { return(Money.Zero); } foreach (var condition in m_Conditions) { if (condition.IsSatisfiedBy(screening)) { return(GetDiscountAmount(screening)); } } return(Money.Zero); }
protected abstract Money GetDiscountAmount(Screening screening);