private IDownloadedFile UpdateStatus(IDownloadedFile file, DownloadStatutes statuts) { using (repoDownloadedFile) { var domainFile = repoDownloadedFile.Find(file.Id); domainFile.ProcessingStatus = (int)statuts; repoDownloadedFile.SaveChanges(); return(new ViewModels.DownloadedFile() { Id = file.Id, ProcessingStatus = statuts.ToString(), Source = file.Source, ProcessingStatusId = domainFile.ProcessingStatus, Url = file.Url }); } }
public IDownloadedFile ApproveFile(IDownloadedFile file) { return(UpdateStatus(file, DownloadStatutes.Approved)); }
public IDownloadedFile RejectFile(IDownloadedFile file) { return(UpdateStatus(file, DownloadStatutes.Rejected)); }
public FileContent(IDownloadedFile file) { File = file; }
public TextFileContent(IDownloadedFile file) : base(file) { Content = StaticTools.Utilities.Specific.ByteArrayToString(file.Buffor); }
public UnsupportedFIleContent(IDownloadedFile file) : base(file) { }
public ImageFileContent(IDownloadedFile file) : base(file) { Content = StaticTools.Utilities.Specific.ByteArratToImage(file.Buffor); }