コード例 #1
0
 public MovieDetailsService(
     ISettings settings,
     ITmdbApiService tmdbApiService,
     IMovieDetailModelConfigurator movieDetailModelConfigurator,
     IPersonDetailModelConfigurator personDetailModelConfigurator,
     IVideoService videoService)
 {
     _settings       = settings;
     _tmdbApiService = tmdbApiService;
     _movieDetailModelConfigurator  = movieDetailModelConfigurator;
     _personDetailModelConfigurator = personDetailModelConfigurator;
     _videoService = videoService;
 }
コード例 #2
0
        public UsersMovieListsService2(
            ISettings settings,
            ITmdbApiService tmdbApiService,
            IMovieDetailModelConfigurator movieDetailConfigurator2)
        {
            _settings                = settings;
            _tmdbApiService          = tmdbApiService;
            _movieDetailConfigurator = movieDetailConfigurator2;

            CustomListsService        = new CustomListsService(_settings, _tmdbApiService, _movieDetailConfigurator);
            FavoriteMoviesListService = new FavoriteMoviesListService(_settings, _tmdbApiService, _movieDetailConfigurator);
            WatchlistService          = new WatchlistService(_settings, _tmdbApiService, _movieDetailConfigurator);
        }
コード例 #3
0
        /// <summary>
        /// Not allowed to throw if targetList != NULL
        /// Appends the movie collection in the "MovieDetailModels" property of the server response
        /// to the target's same named property. Updates the targets page and result counters from the serverResponse
        /// </summary>
        /// <param name="targetList">this is the public observered collection wich is updated with data from the server's response</param>
        /// <param name="serverResponse">contains the server's response, containing movies to append to the observed collection and page/result counter</param>
        public static void AppendResult(this SearchResult targetList, SearchResult serverResponse, IMovieDetailModelConfigurator movieDetailConfigurator)
        {
            if (serverResponse.MovieDetailModels.Count > 0)
            {
                movieDetailConfigurator.SetImageSrc(serverResponse.MovieDetailModels);
                movieDetailConfigurator.SetGenreNamesFromGenreIds(serverResponse.MovieDetailModels);

                foreach (MovieDetailModel movie in serverResponse.MovieDetailModels)
                {
                    targetList.MovieDetailModels.Add(movie);
                }

                targetList.Page         = serverResponse.Page;
                targetList.TotalPages   = serverResponse.TotalPages;
                targetList.TotalResults = serverResponse.TotalResults;
            }
        }