Exemple #1
0
        /// <summary>
        /// Creates a new instance with the provided api configuration
        /// </summary>
        /// <param name="apiConfiguration">The API configuration</param>
        public TheTVDBManager(IApiConfiguration apiConfiguration)
        {
            if (apiConfiguration == null)
            {
                throw new ArgumentNullException(nameof(apiConfiguration));
            }
            if (string.IsNullOrWhiteSpace(apiConfiguration.BaseUrl))
            {
                throw new ArgumentOutOfRangeException(nameof(apiConfiguration), "Base url must be set");
            }

            // Proxy Services
            _seriesService  = new SeriesServiceProxy(apiConfiguration);
            _episodeService = new EpisodeServiceProxy(apiConfiguration);
            _updateService  = new UpdateServiceProxy(apiConfiguration);
            _bannerService  = new BannerServiceProxy(apiConfiguration);

            // Initialize parse services
            var actorParseService  = new ActorParseService();
            var bannerParseService = new BannerParseService();

            _episodeParseService = new EpisodeParseService();
            _seriesParseService  = new SeriesParseService(actorParseService, bannerParseService, _episodeParseService);
            _updateParseService  = new UpdateParseService();
        }
Exemple #2
0
        public SeriesParseServiceTest()
        {
            var actorParseService   = new ActorParseService();
            var bannerParseService  = new BannerParseService();
            var episodeParseService = new EpisodeParseService();

            _seriesParseService = new SeriesParseService(actorParseService,
                                                         bannerParseService,
                                                         episodeParseService);
        }