public SeriesParseServiceTest() { var actorParseService = new TheTvDbActorParser(); var bannerParseService = new TheTvDbBannerParser(); var episodeParseService = new TheTvDbEpisodeParser(); _seriesParseService = new TheTvDbSeriesParser(actorParseService, bannerParseService, episodeParseService); }
/// <summary> /// Creates a new instance with the provided api configuration /// </summary> /// <param name="apiConfiguration">The API configuration</param> public TheTvDbClient(ITheTvDbApiConfiguration 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 _seriesServiceProxy = new TheTvDbSeriesServiceProxy(apiConfiguration); _episodeServiceProxy = new TheTvDbEpisodeServiceProxy(apiConfiguration); _updateServiceProxy = new TheTvDbUpdateServiceProxy(apiConfiguration); _bannerServiceProxy = new TheTvDbBannerServiceProxy(apiConfiguration); // Initialize parse services var actorParser = new TheTvDbActorParser(); var bannerParser = new TheTvDbBannerParser(); _episodeParser = new TheTvDbEpisodeParser(); _seriesParser = new TheTvDbSeriesParser(actorParser, bannerParser, _episodeParser); _updateParser = new TheTvDbUpdateParser(); }