public IEnumerable <Gift> GetGiftsByCriteria(GiftCriteriaBuilder giftCriteria) { var criteria = giftCriteria; int lowerPrice = criteria.Price.GetLower() * 100; int upperPrice = criteria.Price.GetUpper() * 100; var gifts = GetAll().Where(g => g.AgeCategory == criteria.Age && g.Recipient == criteria.Recipient && g.Price >= lowerPrice && g.Price <= upperPrice); return(gifts); }
public PollStateMachine(IServiceProvider scopeFactory) { _stateStorage = new Dictionary <string, IState>(); _scope = scopeFactory.CreateScope(); GiftCriteria = new GiftCriteriaBuilder(); }