Пример #1
0
        public void Run()
        {
            try
            {
                _reportReader.Read(File.ReadAllText(_switchArgs.TargetFilePath, Encoding.GetEncoding(1252)));
                IReportContainer reportContainer = _reportReader.GetProperties();

                if (_switchArgs.OutputFile != string.Empty)
                {
                    _outputHandler.PrintToFile(reportContainer.ToJSON(), _switchArgs.OutputFile);
                }

                _outputHandler.ToOutputStream(reportContainer.ToJSON());
            }
            catch (Exception ex)
            {
                _outputHandler.OutputError($"{_switchArgs.TargetFilePath}\n\n{ex.Message}\n\n{ex.StackTrace}");
            }
        }