/// <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; }
/// <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; }
/// <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; }
/// <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; }
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) { }
/// <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) { }