Exemplo n.º 1
0
     public static AnimeRecsRecommendationType GetRecommendationType(MalAnimeRecsRecommenderUser recommender,
 MalAnimeRecsRecommenderRecommendation rec, IDictionary<int, MalListEntry> userAnimeList)
     {
         if (recommender.RecsNotInCommon.Contains(rec))
         {
             return AnimeRecsRecommendationType.UsefulRecommendation;
         }
         else if (recommender.RecsInconclusive.Contains(rec))
         {
             if (userAnimeList.ContainsKey(rec.MalAnimeId) &&
                 (userAnimeList[rec.MalAnimeId].Status == CompletionStatus.Watching
                 || userAnimeList[rec.MalAnimeId].Status == CompletionStatus.PlanToWatch
                 || userAnimeList[rec.MalAnimeId].Status == CompletionStatus.OnHold))
             {
                 return AnimeRecsRecommendationType.UsefulRecommendation;
             }
             else
             {
                 return AnimeRecsRecommendationType.Inconclusive;
             }
         }
         else if (recommender.RecsLiked.Contains(rec))
         {
             return AnimeRecsRecommendationType.Liked;
         }
         else
         {
             return AnimeRecsRecommendationType.NotLiked;
         }
     }
Exemplo n.º 2
0
 public static AnimeRecsRecommendationType GetRecommendationType(MalAnimeRecsRecommenderUser recommender,
                                                                 MalAnimeRecsRecommenderRecommendation rec, IDictionary <int, MalListEntry> userAnimeList)
 {
     if (recommender.RecsNotInCommon.Contains(rec))
     {
         return(AnimeRecsRecommendationType.UsefulRecommendation);
     }
     else if (recommender.RecsInconclusive.Contains(rec))
     {
         if (userAnimeList.ContainsKey(rec.MalAnimeId) &&
             (userAnimeList[rec.MalAnimeId].Status == CompletionStatus.Watching ||
              userAnimeList[rec.MalAnimeId].Status == CompletionStatus.PlanToWatch ||
              userAnimeList[rec.MalAnimeId].Status == CompletionStatus.OnHold))
         {
             return(AnimeRecsRecommendationType.UsefulRecommendation);
         }
         else
         {
             return(AnimeRecsRecommendationType.Inconclusive);
         }
     }
     else if (recommender.RecsLiked.Contains(rec))
     {
         return(AnimeRecsRecommendationType.Liked);
     }
     else
     {
         return(AnimeRecsRecommendationType.NotLiked);
     }
 }