Exemple #1
0
 public void RemoveItemCriterion(IItemCriterion criterion)
 {
     if (_itemCriteria.Contains(criterion))
     {
         _itemCriteria.Remove(criterion);
     }
 }
Exemple #2
0
        public void AddItemCriterion(IItemCriterion criterion)
        {
            if (!criterion.MultipleCriteriaAllowed && _itemCriteria.Any(c => c.GetType() == criterion.GetType()))
            {
                throw new InvalidOperationException("The criterion only allows to be applied once");
            }

            _itemCriteria.Add(criterion);
        }