コード例 #1
0
        public bool AddDislikeCategory(RankingCategory category)
        {
            var target = MiddlePriorityCategory.FirstOrDefault(x => x.Category == category);

            if (target != null)
            {
                MiddlePriorityCategory.Remove(target);
                LowPriorityCategory.Add(target);
                return(true);
            }
            else if ((target = HighPriorityCategory.FirstOrDefault(x => x.Category == category)) != null)
            {
                HighPriorityCategory.Remove(target);
                LowPriorityCategory.Add(target);
                return(true);
            }

            return(false);
        }