private Pdf2JpgFileInfo TransformPdfFile(string filePath) { var pdfFile = new Pdf2JpgFileInfo(); pdfFile.FilePath = filePath; pdfFile.FileName = filePath.Substring(filePath.LastIndexOf("\\") + 1, filePath.Length - filePath.LastIndexOf("\\") - 1); pdfFile.FileSize = Utils.CountSize(Utils.GetFileSize(filePath)); return(pdfFile); }
private List <Pdf2JpgFileInfo> TransformPdfFiles(string[] files, string[] safeFiles, string[] filePaths) { var pdf2Jpgs = new List <Pdf2JpgFileInfo>(); for (var i = 0; i < files.Length; i++) { var pdf2Jpg = new Pdf2JpgFileInfo { FileName = safeFiles[i], FilePath = filePaths[i], FileSize = Utils.CountSize(Utils.GetFileSize(filePaths[i])) }; pdf2Jpgs.Add(pdf2Jpg); } return(pdf2Jpgs); }