/// <exception cref="ArgumentNullException"> /// <paramref name="htmlLoader" /> or /// <paramref name="parser" /> or /// <paramref name="backupProcessor" /> or /// <paramref name="httpDownloadManager" /> or /// <paramref name="dataService" /> or /// <paramref name="fileSystemProxy" /> is <see langword="null" />.</exception> internal PluralsightCatalog(IHtmlLoader htmlLoader, ITrainingCatalogParser <PluralsightCategory, PluralsightCourse, PluralsightAuthor> parser, ICatalogBackupProcessor <PluralsightCategory, PluralsightCourse, PluralsightAuthor> backupProcessor, IHttpDownloadManager httpDownloadManager, IPluralsightDataService dataService, IFileSystemProxy fileSystemProxy) : base(httpDownloadManager, fileSystemProxy) { if (htmlLoader == null) { throw new ArgumentNullException("htmlLoader"); } if (parser == null) { throw new ArgumentNullException("parser"); } if (backupProcessor == null) { throw new ArgumentNullException("backupProcessor"); } if (dataService == null) { throw new ArgumentNullException("dataService"); } _htmlLoader = htmlLoader; _parser = parser; _backupProcessor = backupProcessor; _dataService = dataService; }
/// <exception cref="ArgumentNullException"> /// <paramref name="trainingProviderName"/> or /// <paramref name="host"/> or /// <paramref name="updatesUriOrPath"/> or /// <paramref name="mediaPath"/> is <see langword="null" />.</exception> /// <exception cref="TrainingCatalogInitializationException"></exception> public override void Initialize(string trainingProviderName, int trainingProviderId, string host, string updatesUriOrPath, LocationType catalogLocation, IMediaPath mediaPath, string archiveDirectory) { base.Initialize(trainingProviderName, trainingProviderId, host, updatesUriOrPath, catalogLocation, mediaPath, archiveDirectory); if (_parser == null) { var nodeSelector = new PluralsightNodeSelector(); var nodeParser = new PluralsightNodeParser(Host, nodeSelector); _parser = new PluralsightCatalogParser(nodeSelector, nodeParser); } }