コード例 #1
0
        static void Main()
        {
            try
            {
                Console.WriteLine("Please specify the file to convert to HTML.");
                var fullFilePath = Console.ReadLine();

                var fileProcessor = new FileProcessor(fullFilePath);

                var tagsToReplace = new Dictionary <string, (string, string)>
                {
                    { "**", ("<strong>", "</strong>") },
                    { "*", ("<em>", "</em>") },
コード例 #2
0
        static void Main()
        {
            try
            {
                Console.WriteLine("Please specify the file to convert to HTML.");
                var fullFilePath = Console.ReadLine();

                var fileProcessor = new FileProcessor(fullFilePath);
                var textProcessor = new TextProcessor(fileProcessor);

                textProcessor.ConvertText();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
コード例 #3
0
 public TextProcessor(FileProcessor fileProcessor)
 {
     this.fileProcessor = fileProcessor;
 }