private IHostBlockCoordinator Create(ISettings settings = null, IFileDownloader downloader = null, IHostFileFactory hostFileFactory = null, ITextFileReaderFactory textFileReaderFactory = null, ITextFileWriterFactory textFileWriterFactory = null, IBlocklistCacheManager blocklistCacheManager = null, ISimpleLoggerFacade logger = null) { return(new HostBlockCoordinator( settings ?? Substitute.For <ISettings>(), downloader ?? Substitute.For <IFileDownloader>(), hostFileFactory ?? Substitute.For <IHostFileFactory>(), textFileReaderFactory ?? Substitute.For <ITextFileReaderFactory>(), textFileWriterFactory ?? Substitute.For <ITextFileWriterFactory>(), blocklistCacheManager ?? Substitute.For <IBlocklistCacheManager>(), logger ?? Substitute.For <ISimpleLoggerFacade>())); }
public HostBlockCoordinator(ISettings settings, IFileDownloader fileDownloader, IHostFileFactory hostFileFactory, ITextFileReaderFactory textFileReaderFactory, ITextFileWriterFactory textFileWriterFactory, IBlocklistCacheManager blocklistCacheManager, ISimpleLoggerFacade logger) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } if (fileDownloader == null) { throw new ArgumentNullException(nameof(fileDownloader)); } if (hostFileFactory == null) { throw new ArgumentNullException(nameof(hostFileFactory)); } if (textFileReaderFactory == null) { throw new ArgumentNullException(nameof(textFileReaderFactory)); } if (textFileWriterFactory == null) { throw new ArgumentNullException(nameof(textFileWriterFactory)); } if (blocklistCacheManager == null) { throw new ArgumentNullException(nameof(blocklistCacheManager)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } _settings = settings; _fileDownloader = fileDownloader; _hostFileFactory = hostFileFactory; _textFileReaderFactory = textFileReaderFactory; _textFileWriterFactory = textFileWriterFactory; _blocklistCacheManager = blocklistCacheManager; _logger = logger; }