示例#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>();
        }
 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;
 }