public async Task DownloadMarsRovePhotos(List <Photos> photos) { FileDownload filedownload = new FileDownload(); Console.WriteLine("Downloading Files... \n"); foreach (var item in photos) { await filedownload.DownloadImage(item.img_src.Trim(), Constant.ImageFolder); } Console.WriteLine("All Files Downloaded Successfully.."); }
private string sections() { FileDownload filedownload = new FileDownload(); string sections = ""; foreach (var date in dates) { sections += "<div class='panel panel-default'>"; sections += String.Format("<div class='panel-heading'>{0}</div>", date); sections += "<div class='panel-body'>"; sections += "<div class='center slider'>"; var photodates = from photo in photos where photo.earthdate == date select photo; foreach (var img in photodates) { sections += "<div>"; sections += String.Format("<img src='{0}/{1}'/>", Constant.ImageFolder, filedownload.getFileName(img.img_src)); sections += "</div>"; } sections += "</div>"; sections += "</div>"; sections += "</div>"; } return(sections); }