예제 #1
0
 public WebScrapperManager(ILogger <WebScrapperManager> logger, ISpiderFactory spiderFactory)
 {
     _logger           = logger;
     _spiderFactory    = spiderFactory;
     _threads          = new List <Thread>();
     _spiders          = new List <ISpider>();
     CancellationToken = new CancellationToken();
 }
예제 #2
0
        protected TestBase()
        {
            var services = new ServiceCollection();

            services.AddDotnetSpider(builder =>
            {
                builder.UseConfiguration();
                builder.UseSerilog();
                builder.UseStandalone();
                builder.UseDefaultDownloaderAllocator();
            });
            SpiderFactory = services.BuildServiceProvider().GetRequiredService <ISpiderFactory>();
        }
예제 #3
0
 public void Setup()
 {
     _spiderFactory = new SpiderFactory();
     _inputParser   = new InputParser(_spiderFactory);
 }
예제 #4
0
 public UserHandler(ISpiderFactory spiderFactory)
 {
     _inputValidator = new InputValidator();
     _inputParser    = new InputParser(spiderFactory);
     ReadInputInformation();
 }
예제 #5
0
 public InputParser(ISpiderFactory spiderFactory)
 {
     _spiderFactory = spiderFactory;
 }