Exemplo n.º 1
0
        public override ConceptualFilter Clone()
        {
            ConceptualCategoryFilter filter = new ConceptualCategoryFilter(this);

            if (_category != null)
            {
                filter._category = _category.Clone();
            }

            return(filter);
        }
 public bool UpdateCategoryItem(CategoryItem item)
 {
     if (_categoryItems.ContainsKey(item.Id))
     {
         _categoryItems[item.Id] = item.Clone();
     }
     else
     {
         throw new Exception("Item does not exist.");
     }
     return(true);
 }
        public CategoryItem GetCategoryItem(int categoryId)
        {
            CategoryItem item = null;

            if (_categoryItems.ContainsKey(categoryId))
            {
                item = _categoryItems[categoryId];
            }
            else
            {
                throw new Exception("Item does not exist.");
            }

            return(item.Clone());
        }