Exemple #1
0
        public static void OutputFile(string fileName,
                                      List <string> strings,
                                      Options options)
        {
            bool    traceException = options.IsTraceOn(Trace_Options.TraceExceptions);
            IFileIO fileIO         = FileIOFactory.GetFileIO();

            fileIO.OutputFile(fileName, strings, traceException);
        }
        public void CreateFile()
        {
            string fileName = OutputFilePath;

            Console.WriteLine("Outputing Method [" + fileName + "] with " + _strings.Count.ToString() + " Lines");
            foreach (string s in _strings)
            {
                Console.WriteLine("-----" + s);
            }

            _fileIO.OutputFile(fileName, _strings, false);

            Console.WriteLine("Finish Outputing File [" + fileName + "]");
        }
        public void OutputFile(string fileName, List <string> strings, bool traceException)
        {
            string actualFileName = GetActualFileName(fileName);

            _fileIO.WriteLog("Actual FileName = " + actualFileName, traceException);
            _fileIO.OutputFile(actualFileName, strings, traceException);

            string str = "Lines = " + strings.Count.ToString();

            _fileIO.WriteLog(str, traceException);
            foreach (string s in strings)
            {
                str = "---" + s;
                _fileIO.WriteLog(str, traceException);
            }
        }