public InternetDownloader(ILogger logger, string startUrl, string storagePath, int nestLevelLimit, InternetDownloaderOption option, string[] extensionConstraints) { this.logger = logger; this.startUrl = startUrl; this.storagePath = storagePath; this.nestLevelLimit = nestLevelLimit; this.option = option; this.extensionConstraints = extensionConstraints; }
public LinkService(HtmlNode htmlNode, string rootFolder, string rootPath, string[] extensionConstraints, int level, int nestLevelLimit, ILogger logger, InternetDownloaderOption option) { this.option = option; this.logger = logger ?? throw new InternetDownloaderException($"Argument is null: {nameof(logger)}"); this.htmlNode = htmlNode; this.rootFolder = rootFolder; this.rootPath = RemoveParamsFromUrl(rootPath); protocol = rootPath.Substring(0, rootPath.IndexOf('/')); this.extensionConstraints = extensionConstraints; this.level = level; this.nestLevelLimit = nestLevelLimit; _links = new List <string>(0); }