public void UpdateOffers(Holidays holiday, AppliedDiscount discount) { if (AppliedOffers.ContainsKey(holiday)) { AppliedOffers.Remove(holiday); } AppliedOffers.Add(holiday, discount); }
private int GetDiscount(Holidays holiday) { return(AppliedOffers.ContainsKey(holiday) ? (int)AppliedOffers[holiday] : 0); }