private async Task <ImageStatusFile> IndexImage(IStorageFeed feed, PackageName packageName, IBinaryInfo binaryInfo) { var statusFile = new ImageStatusFile(binaryInfo.File.FullPath, new ImageStatus(new ImageName(binaryInfo.Name, binaryInfo.Hash))); //try //{ // //Debug.WriteLine("Indexing image {0}", imageStatus.ImageName); // //imageStatus.Stored = true; // //Debug.WriteLine("Stored image {0}", imageStatus.ImageName); //} //catch (Exception e) //{ // support.TrackException(e); // statusFile.ImageStatus.Exception = new ExceptionStatus(e); //} if (binaryInfo.SymbolInfo != null) { statusFile.ImageStatus.SymbolStatus = await IndexSymbol(feed, packageName, binaryInfo); } return(statusFile); }
private async Task <ImageStatusFile> DeleteImage(IStorageFeed feed, PackageName packageName, ImageStatusFile statusFile) { var newStatusFile = new ImageStatusFile(statusFile.FilePath, new ImageStatus(statusFile.ImageStatus.ImageName)); //try //{ // //Debug.WriteLine("Deleting image {0}", statusFile.ImageStatus.ImageName); // //statusFile.ImageStatus.Stored = false; // statusFile.ImageStatus.Exception = null; // //Debug.WriteLine("Deleted image {0}", statusFile.ImageStatus.ImageName); //} //catch (Exception e) //{ // support.TrackException(e); // newStatusFile.ImageStatus.Exception = new ExceptionStatus(e); //} if (statusFile.ImageStatus.SymbolStatus != null) { newStatusFile.ImageStatus.SymbolStatus = await DeleteSymbol(feed, packageName, statusFile.ImageStatus.SymbolStatus); } return(newStatusFile); }