Beispiel #1
0
        /// <summary>
        /// starts the import of the file
        /// </summary>
        /// <param name="sourceFile">source-File</param>
        public void Start(ExportFile sourceFile)
        {
            ExportFile exportedFile = new ExportFile(exportFile(sourceFile));

            exportedFile.Data = sourceFile.Data;

            try
            {
                _idxBuilder.BuildIdx(exportedFile);

                _fileHandler.CreateReadyFile(exportedFile.File);

                _fileHandler.BackupFile(sourceFile.File, ExportModel.BackupDirectory);

                Messenger?.SendMessage($"{sourceFile.File.Name} exported!");
            }catch (Exception e)
            {
                Messenger?.SendMessage($"Export of File {sourceFile.File.Name} failed!");
            }
        }