Exemple #1
0
        public static void Copy(RottenTomatoesMovies response, string groupId, string groupName)
        {
            try
            {
                MovieGroup mg = APIMASH_RottenTomatoesCollection.GetGroupByTitle(groupName);
                if (mg != null)
                {
                    mg.Items.Clear();
                }
                else
                {
                    mg = new MovieGroup(groupId, groupName, response.Movies[0].Posters.Original);
                }

                foreach (var mi in response.Movies.Select(t => new MovieItem(
                                                              t.Id,
                                                              t.Title,
                                                              t.MPAARating,
                                                              t.Ratings.AudienceRating,
                                                              t.Ratings.CriticsRating,
                                                              t.Links.Clips,
                                                              t.Links.Reviews,
                                                              t.Links.Cast,
                                                              t.Posters.Original,
                                                              t.Synopsis,
                                                              mg)))
                {
                    mg.Items.Add(mi);
                }
                _movieData._allGroups.Add(mg);
            }
            catch (Exception e)
            {
                throw;
            }
        }
Exemple #2
0
 public MovieItem(string uniqueId, string title, string rating, string audienceScore, string criticsScore, string clips, string reviews, string cast, string imagePath, string description, MovieGroup movieGroup)
     : base(uniqueId, title, rating, audienceScore, criticsScore, clips, reviews, cast, imagePath, description)
 {
     this._movieGroup = movieGroup;
 }