/// <exception cref="ArgumentNullException"><paramref name="updateParseResult"/> is <see langword="null" />.</exception>
 protected TrainingCatalogChangesProcessor(IUpdateContentParseResult <TCategoryParseModel, TCourseParseModel, TAuthorParseModel> updateParseResult)
 {
     if (updateParseResult == null)
     {
         throw new ArgumentNullException("updateParseResult");
     }
     _updateParseResult = updateParseResult;
 }
Esempio n. 2
0
        /// <exception cref="ArgumentNullException">
        /// <paramref name="updateParseResult" /> or
        /// <paramref name="dataService" /> is <see langword="null" />.</exception>
        public PluralsightChangesProcessor(
            IUpdateContentParseResult <PluralsightCategory, PluralsightCourse, PluralsightAuthor> updateParseResult,
            IPluralsightDataService dataService)
            : base(updateParseResult)
        {
            if (dataService == null)
            {
                throw new ArgumentNullException("dataService");
            }

            _dataService = dataService;
        }
        CreateChangesProcessor(IUpdateContentParseResult <PluralsightCategory, PluralsightCourse, PluralsightAuthor> updateParseResult,
                               bool useArchiveData)
        {
            if (_dataService == null)
            {
                _dataService = useArchiveData
               ? new PluralsightArchiveDataService(ArchiveFolderPath, FileSystemProxy)
               : (IPluralsightDataService)
                               new PluralsightWebDataService(ArchiveCurrentSaveDirectory, HttpDownloadManager, FileSystemProxy);
            }

            var changesProcessor = new PluralsightChangesProcessor(updateParseResult, _dataService);

            return(changesProcessor);
        }
 CreateChangesProcessor(
     IUpdateContentParseResult <TCategoryParseModel, TCourseParseModel, TAuthorParseModel> updateParseResult,
     bool useArchiveData);