public void HandlePart( IWebProxy webProxy, HtmlDocument htmlDoc, Uri downloadUri, string targetPath, LinkHandlingOptions linkHandlingOption, Action <InformationGridEntryViewData> onNewInfo) { var pathParts = GetParts(htmlDoc, onNewInfo); foreach (var part in pathParts) { // This indicates that we need no download and can just leave it if (part.Value.StartsWith("data:")) { continue; } var absoluteUrlPath = _urlAligner.CreateAbsoluteUrl(downloadUri, part.Value); if (linkHandlingOption.DoDownloadLocally) { var download = webProxy.DownloadData(absoluteUrlPath); if (download != null) { var savePath = _filePathFactory.CreateAbsoluteSavePath(targetPath, part.Value); part.WriteValue(savePath); _fileRepo.SaveData(savePath, download); PostProcessPart(webProxy, part, absoluteUrlPath, savePath); } } else { part.WriteValue(absoluteUrlPath); } } }