コード例 #1
0
        public override ConceptualFilter Clone()
        {
            ConceptualCategoryFilter filter = new ConceptualCategoryFilter(this);

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

            return(filter);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
        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());
        }