public DownloaderAllocator( IDownloaderAgentOptions options, ILoggerFactory loggerFactory) { _loggerFactory = loggerFactory; _options = options; }
/// <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; }
public LocalDownloaderAgent(IDownloaderAgentOptions options, IMessageQueue mq, IDownloaderAllocator downloaderAllocator, NetworkCenter networkCenter, ILoggerFactory loggerFactory) : base(options, mq, downloaderAllocator, networkCenter, loggerFactory) { ConfigureDownloader = downloader => downloader.Logger = null; }
/// <summary> /// 构造方法 /// </summary> /// <param name="options">选项</param> /// <param name="loggerFactory">日志接口工厂</param> public DownloaderAllocator( IProxyValidator proxyValidator, IDownloaderAgentOptions options, ILoggerFactory loggerFactory) { _proxyValidator = proxyValidator; _loggerFactory = loggerFactory; _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, IMessageQueue mq, IDownloaderAllocator downloaderAllocator, NetworkCenter networkCenter, ILogger logger) { _mq = mq; _downloaderAllocator = downloaderAllocator; _options = options; Framework.NetworkCenter = networkCenter; Logger = logger; }
protected DownloaderAgentBase( IDownloaderAgentOptions options, IMessageQueue mq, IDownloaderAllocator downloaderAllocator, NetworkCenter networkCenter, ILoggerFactory loggerFactory) { _mq = mq; _downloaderAllocator = downloaderAllocator; _options = options; Framework.NetworkCenter = networkCenter; Logger = loggerFactory.CreateLogger(GetType().FullName); }
public NetworkCenter( IAdslRedialer redialer, IInternetDetector internetDetector, ILockerFactory lockerFactory, IDownloaderAgentOptions options, ILogger <NetworkCenter> logger) { _redialer = redialer; _internetDetector = internetDetector; _lockerFactory = lockerFactory; _options = options; _logger = logger; _sessionsFolder = Path.Combine(Framework.GlobalDirectory, "sessions"); if (!Directory.Exists(_sessionsFolder)) { Directory.CreateDirectory(_sessionsFolder); } }
/// <summary> /// 构造方法 /// </summary> protected AdslRedialerBase(IDownloaderAgentOptions options) { Options = options; }
/// <summary> /// 构造方法 /// </summary> public DefaultAdslRedialer(IDownloaderAgentOptions options) : base(options) { }
/// <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, IMessageQueue mq, IDownloaderAllocator downloaderAllocator, NetworkCenter networkCenter, ILogger logger) : base(options, mq, downloaderAllocator, networkCenter, logger) { }