Example #1
0
        public void AdjustCommentCount(ItemKey itemKey, int adjustment)
        {
            ItemInfo ii = null;

            if (itemKey.GetType(this).Commentable)
            {
                try
                {
                    ii = new ItemInfo(this, itemKey);
                }
                catch (InvalidIteminfoException)
                {
                    ii = ItemInfo.Create(this, itemKey);
                }

                ii.AdjustComments(adjustment);
                ii.Update();
            }
            else
            {
                throw new InvalidItemException();
            }
        }