public void RemoveItemCriterion(IItemCriterion criterion) { if (_itemCriteria.Contains(criterion)) { _itemCriteria.Remove(criterion); } }
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); }