/// <summary> /// Initializes a new instance of the MovieDetailsViewModel class. /// </summary> /// <param name="movieService">Service used to interact with movies</param> /// <param name="languageService">Language service</param> /// <param name="movieTrailerService">The movie trailer service</param> /// <param name="subtitlesService">The subtitles service</param> public MovieDetailsViewModel(IMovieService movieService, ILanguageService languageService, IMovieTrailerService movieTrailerService, ISubtitlesService subtitlesService) { _movieTrailerService = movieTrailerService; _movieService = movieService; _subtitlesService = subtitlesService; _cancellationLoadingToken = new CancellationTokenSource(); _cancellationLoadingTrailerToken = new CancellationTokenSource(); DownloadMovie = new DownloadMovieViewModel(subtitlesService, languageService); RegisterMessages(); RegisterCommands(); }
/// <summary> /// Initializes a new instance of the MovieDetailsViewModel class. /// </summary> /// <param name="movieService">Service used to interact with movies</param> /// <param name="movieTrailerService">The movie trailer service</param> /// <param name="subtitlesService">The subtitles service</param> public MovieDetailsViewModel(IMovieService movieService, IMovieTrailerService movieTrailerService, ISubtitlesService subtitlesService) { _movieTrailerService = movieTrailerService; _movieService = movieService; Movie = new MovieJson(); SimilarMovies = new ObservableCollection <MovieLightJson>(); SubtitlesService = subtitlesService; CancellationLoadingToken = new CancellationTokenSource(); CancellationLoadingTrailerToken = new CancellationTokenSource(); DownloadMovie = new DownloadMovieViewModel(subtitlesService, new DownloadMovieService <MovieJson>()); RegisterMessages(); RegisterCommands(); }
public TrailersController(IMovieTrailerService movieService) { _movieService = movieService; }