/// <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)); } } } }
/// <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)); } } }