示例#1
0
        /// <summary>
        /// Handle the creation of an text file, fetch settings, and display output choices dialog.
        /// </summary>
        /// <param name="outputDirectory">The output directory.</param>
        public void Handle(string outputDirectory)
        {
            if (_settings.ShowConfig)
            {
                using (var fileOutput = new FileOutput(FileType.Text, outputDirectory))
                    fileOutput.ShowDialog();
            }
            else
            {
                var filename          = _filenameMask.Generate(_settings.FilenameMask);
                var filenameExtension = _settings.FilenameExtension;
                var fullOutputPath    = Path.Combine(outputDirectory, $"{filename}.{filenameExtension}");

                WriteOut(fullOutputPath);
            }
        }