Example #1
0
        public frmMain(
            ILogger logger,
            IHttpClient httpClient,
            Container diContainer,
            IAuthorProfileGenerator authorProfileGenerator,
            IAmazonClient amazonClient,
            PreviewProviderFactory previewProviderFactory,
            IAmazonInfoParser amazonInfoParser,
            IAliasesRepository aliasesRepository,
            IPreviewDataExporter previewDataExporter,
            XRayExporterFactory xrayExporterFactory,
            ChaptersService chaptersService,
            IXRayService xrayService,
            ITermsService termsService)
        {
            InitializeComponent();
            _progress = new ProgressBarCtrl(prgBar);
            var rtfLogger = new RtfLogger(txtOutput);

            _logger                 = logger;
            _diContainer            = diContainer;
            _authorProfileGenerator = authorProfileGenerator;
            _amazonClient           = amazonClient;
            _previewProviderFactory = previewProviderFactory;
            _amazonInfoParser       = amazonInfoParser;
            _aliasesRepository      = aliasesRepository;
            _previewDataExporter    = previewDataExporter;
            _xrayExporterFactory    = xrayExporterFactory;
            _chaptersService        = chaptersService;
            _xrayService            = xrayService;
            _termsService           = termsService;
            _logger.LogEvent       += rtfLogger.Log;
            _httpClient             = httpClient;
        }
 public XRayService(ILogger logger, ChaptersService chaptersService, IAliasesRepository aliasesRepository)
 {
     _logger            = logger;
     _chaptersService   = chaptersService;
     _aliasesRepository = aliasesRepository;
     _encoding          = CodePagesEncodingProvider.Instance.GetEncoding(1252);
 }
Example #3
0
 public void Setup()
 {
     _logger          = new Logger();
     _file            = new SecondarySourceFile(_logger);
     _chaptersService = new ChaptersService(_logger);
     _xrayService     = new XRayService(new AliasesService(_logger), _logger, _chaptersService);
 }
Example #4
0
 public void Setup()
 {
     _logger          = new Logger();
     _termsService    = new TermsService();
     _file            = new SecondarySourceFile(_logger, _termsService);
     _chaptersService = new ChaptersService(_logger);
     _xrayService     = new XRayService(_logger, _chaptersService, new AliasesRepository(_logger, new AliasesService(_logger)));
 }
Example #5
0
 public XRayService(ILogger logger, ChaptersService chaptersService, IAliasesRepository aliasesRepository, IDirectoryService directoryService, ITermsService termsService, IParagraphsService paragraphsService)
 {
     _logger            = logger;
     _chaptersService   = chaptersService;
     _aliasesRepository = aliasesRepository;
     _directoryService  = directoryService;
     _termsService      = termsService;
     _paragraphsService = paragraphsService;
 }
Example #6
0
 public void Setup()
 {
     _logger           = new Logger();
     _termsService     = new TermsService(new XRayBuilderConfig());
     _file             = new SecondarySourceFile(_logger, _termsService);
     _chaptersService  = new ChaptersService(_logger);
     _directoryService = new DirectoryService(_logger, null);
     _xrayService      = new XRayService(_logger, _chaptersService, new AliasesRepository(_logger, new AliasesService(_logger), _directoryService), _directoryService, _termsService, new ParagraphsService());
 }
Example #7
0
 public void Setup()
 {
     _logger            = new Logger();
     _file              = new SecondarySourceFile(_logger);
     _aliasesRepository = new AliasesRepository(_logger);
     _xrayExporter      = new XRayExporterJson();
     _chaptersService   = new ChaptersService(_logger);
     _xrayService       = new XRayService(new AliasesService(_logger), _logger, _chaptersService);
 }
Example #8
0
 public XRay(string shelfari, ISecondarySource dataSource, ILogger logger, ChaptersService chaptersService)
 {
     if (!shelfari.ToLower().StartsWith("http://") && !shelfari.ToLower().StartsWith("https://"))
     {
         shelfari = "https://" + shelfari;
     }
     DataUrl          = shelfari;
     DataSource       = dataSource;
     _logger          = logger;
     _chaptersService = chaptersService;
 }
Example #9
0
 // TODO fix this constructor crap
 public XRay(string xml, string db, string guid, string asin, ISecondarySource dataSource, ILogger logger, ChaptersService chaptersService, bool xmlUgh, int locOffset = 0, string aliaspath = "")
 {
     if (xml == "" || db == "" || guid == "" || asin == "")
     {
         throw new ArgumentException("Error initializing X-Ray, one of the required parameters was blank.");
     }
     xmlFile          = xml;
     databaseName     = db;
     Guid             = guid;
     Asin             = asin;
     this.locOffset   = locOffset;
     _aliasPath       = aliaspath;
     DataSource       = dataSource;
     _logger          = logger;
     _chaptersService = chaptersService;
     SkipShelfari     = true;
 }
Example #10
0
        public XRay(string shelfari, string db, string guid, string asin, ISecondarySource dataSource, ILogger logger, ChaptersService chaptersService, int locOffset = 0, string aliaspath = "")
        {
            if (shelfari == "" || db == "" || guid == "" || asin == "")
            {
                throw new ArgumentException("Error initializing X-Ray, one of the required parameters was blank.");
            }

            if (!shelfari.ToLower().StartsWith("http://") && !shelfari.ToLower().StartsWith("https://"))
            {
                shelfari = "https://" + shelfari;
            }
            DataUrl      = shelfari;
            databaseName = db;
            if (guid != null)
            {
                Guid = guid;
            }
            Asin             = asin;
            this.locOffset   = locOffset;
            _aliasPath       = aliaspath;
            DataSource       = dataSource;
            _logger          = logger;
            _chaptersService = chaptersService;
        }
Example #11
0
 public XRayService(IAliasesService aliasesService, ILogger logger, ChaptersService chaptersService)
 {
     _aliasesService  = aliasesService;
     _logger          = logger;
     _chaptersService = chaptersService;
 }
Example #12
0
 public static XRayBuilderGUI.XRay.XRay CreateXRayFromXML(string path, string db, string guid, string asin, SecondarySourceGoodreads goodreads, ILogger logger, ChaptersService chaptersService)
 => new XRayBuilderGUI.XRay.XRay(path, db, guid, asin, goodreads, logger, chaptersService, true, 0, "")
 {
     Unattended = true
 };