public string GetImagePath() { if (ImagePath == NoImagePath) { return NoImagePath; } if (string.IsNullOrWhiteSpace(ImagePath)) { ImagePath = GenerateImagePath(Article); } bool needDownload = !File.Exists(ImagePath); if (needDownload) { var scraper = new BegemotProductScraper(); scraper.DownloadImage(this); } return ImagePath; }
public string DownloadImage(Uri imageUri) { var scraper = new BegemotProductScraper(); scraper.DownloadImage(this, imageUri); return ImagePath; }