Example #1
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="options">下载器代理选项</param>
 /// <param name="mq">消息队列</param>
 /// <param name="downloaderAllocator">分配下载器的接口</param>
 /// <param name="networkCenter">网络中心</param>
 /// <param name="logger">日志接口</param>
 public LocalDownloaderAgent(IDownloaderAgentOptions options, IDynamicMessageQueue dmq,
                             IMessageQueue mq, IDownloaderAllocator downloaderAllocator, NetworkCenter networkCenter,
                             ILogger <LocalDownloaderAgent> logger) : base(options, dmq,
                                                                           mq, downloaderAllocator, networkCenter, logger)
 {
     // ConfigureDownloader = downloader => downloader.Logger = null;
 }
Example #2
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="mq">消息队列</param>
 /// <param name="downloaderAgentStore">下载器代理存储</param>
 /// <param name="options">系统选项</param>
 /// <param name="logger">日志接口</param>
 protected DownloadCenterBase(
     IDynamicMessageQueue dmq,
     IMessageQueue mq,
     IDownloaderAgentStore downloaderAgentStore,
     ISpiderOptions options,
     ILogger logger)
 {
     Dmq = dmq;
     Mq  = mq;
     DownloaderAgentStore = downloaderAgentStore;
     Logger  = logger;
     Options = options;
 }
Example #3
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="options">下载器代理选项</param>
 /// <param name="mq">消息队列</param>
 /// <param name="downloaderAllocator">分配下载器的接口</param>
 /// <param name="networkCenter">网络中心</param>
 /// <param name="logger">日志接口</param>
 protected DownloaderAgentBase(
     IDownloaderAgentOptions options,
     IDynamicMessageQueue dmq,
     IMessageQueue mq,
     IDownloaderAllocator downloaderAllocator,
     NetworkCenter networkCenter,
     ILogger logger)
 {
     _dmq = dmq;
     _mq  = mq;
     _downloaderAllocator    = downloaderAllocator;
     _options                = options;
     Framework.NetworkCenter = networkCenter;
     Logger = logger;
 }
Example #4
0
 /// <summary>
 /// Spider Constructor
 /// </summary>
 /// <param name="mq"></param>
 /// <param name="options"></param>
 /// <param name="logger"></param>
 /// <param name="services">服务提供接口</param>
 /// <param name="statisticsService"></param>
 public Spider(
     IDynamicMessageQueue dmq,
     IMessageQueue mq,
     IStatisticsService statisticsService,
     ISpiderOptions options,
     ILogger <Spider> logger,
     IServiceProvider services)
 {
     _dmq               = dmq;
     _services          = services;
     _statisticsService = statisticsService;
     _mq      = mq;
     _options = options;
     _logger  = logger;
     Console.CancelKeyPress += ConsoleCancelKeyPress;
 }
Example #5
0
 public GithubSpider(IDynamicMessageQueue dmq, IMessageQueue mq, IStatisticsService statisticsService, ISpiderOptions options,
                     ILogger <Spider> logger, IServiceProvider services) : base(dmq, mq, statisticsService, options, logger, services)
 {
 }
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="options">下载器代理选项</param>
 /// <param name="mq">消息队列</param>
 /// <param name="downloaderAllocator">分配下载器的接口</param>
 /// <param name="networkCenter">网络中心</param>
 /// <param name="logger">日志接口</param>
 public DefaultDownloaderAgent(IDownloaderAgentOptions options, IDynamicMessageQueue dmq, IMessageQueue mq,
                               IDownloaderAllocator downloaderAllocator, NetworkCenter networkCenter, ILogger logger) : base(options, dmq, mq,
                                                                                                                             downloaderAllocator, networkCenter, logger)
 {
 }
Example #7
0
 /// <summary>
 /// 构造方法
 /// </summary>
 /// <param name="mq">消息队列</param>
 /// <param name="downloaderAgentStore">下载器代理存储</param>
 /// <param name="options">系统选项</param>
 /// <param name="logger">日志接口</param>
 public DownloadCenter(IDynamicMessageQueue dmq, IMessageQueue mq, IDownloaderAgentStore downloaderAgentStore, ISpiderOptions options,
                       ILogger logger) : base(dmq, mq, downloaderAgentStore, options, logger)
 {
 }