コード例 #1
0
        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
                });
            }
        }
コード例 #2
0
 public IDownloadedFile ApproveFile(IDownloadedFile file)
 {
     return(UpdateStatus(file, DownloadStatutes.Approved));
 }
コード例 #3
0
 public IDownloadedFile RejectFile(IDownloadedFile file)
 {
     return(UpdateStatus(file, DownloadStatutes.Rejected));
 }
コード例 #4
0
 public FileContent(IDownloadedFile file)
 {
     File = file;
 }
コード例 #5
0
 public TextFileContent(IDownloadedFile file)
     : base(file)
 {
     Content = StaticTools.Utilities.Specific.ByteArrayToString(file.Buffor);
 }
コード例 #6
0
 public UnsupportedFIleContent(IDownloadedFile file)
     : base(file)
 {
 }
コード例 #7
0
 public ImageFileContent(IDownloadedFile file)
     : base(file)
 {
     Content = StaticTools.Utilities.Specific.ByteArratToImage(file.Buffor);
 }