コード例 #1
0
        private void StartExport(FileExporter fileExporter)
        {
            long startTime       = DateTime.Now.Millisecond;
            int  fileImportCount = 0;

            foreach (IFileInfo exportFileInfo in _fileHandler.GetImportFiles(ImportModel.ErrorDirectory))
            {
                ExportFile exportFile = new ExportFile(exportFileInfo);
                exportFile.BuilData();

                if (exportFile.Data != null)
                {
                    fileExporter.Start(exportFile);
                    fileImportCount++;
                }
                else
                {
                    Messenger?.SendMessage($"{exportFile.File.Name} couldn't be exported!");
                }
            }
            Inform(fileImportCount, DateTime.Now.Millisecond - startTime);
        }