예제 #1
0
        /// <summary>
        ///     Prepares to categorize games. Prepares a list of genre categories to remove. Does nothing if removeothergenres is
        ///     false.
        /// </summary>
        public override void PreProcess(GameList games, Database db)
        {
            base.PreProcess(games, db);
            if (RemoveOtherGenres)
            {
                SortedSet <string> genreStrings = db.GetAllGenres();
                genreCategories = new SortedSet <Category>();

                foreach (string cStr in genreStrings)
                {
                    if (games.CategoryExists(string.IsNullOrEmpty(Prefix) ? cStr : Prefix + cStr) && !IgnoredGenres.Contains(cStr))
                    {
                        genreCategories.Add(games.GetCategory(cStr));
                    }
                }
            }
        }
예제 #2
0
        /// <summary>
        ///     Prepares to categorize games. Prepares a list of genre categories to remove. Does nothing if removeothergenres is
        ///     false.
        /// </summary>
        public override void PreProcess(GameList games, Database db)
        {
            base.PreProcess(games, db);
            if (!RemoveOtherGenres)
            {
                return;
            }

            genreCategories = new SortedSet <Category>();

            foreach (string genre in db.AllGenres)
            {
                if (games.CategoryExists(string.IsNullOrEmpty(Prefix) ? genre : Prefix + genre) && !IgnoredGenres.Contains(genre))
                {
                    genreCategories.Add(games.GetCategory(genre));
                }
            }
        }