示例#1
0
        public ParameterCore(string logfilename, ArgumentContainer _ArgumentContainer)
        {
            _userParams = new List <UserParameter>();

            _parameterCollection = _ArgumentContainer.ParameterCollection;
            _logger = new LogWriter(logfilename, _ArgumentContainer.EnableLogToConsole);
        }
示例#2
0
        static void Main(string[] args)
        {
            try
            {
                // read program arguments into Argument Container
                ArgumentContainer argContainer = new ArgumentContainer();
                argContainer.ReadArguments(args);

                if (argContainer.GetHelp)
                {
                    Helper.ShowHelpMessage();
                }
                else
                {
                    string _logFilename = string.Empty;

                    if (argContainer.EnableLog)
                    {
                        _logFilename = "ninja-" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".log";
                    }

                    ReportProcessor reportNinja = new ReportProcessor(_logFilename)
                    {
                        ReportArguments = argContainer,
                    };

                    reportNinja.Run();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(string.Format("Exception: {0}", ex.Message));
                Console.WriteLine(string.Format("Inner Exception: {0}", ex.InnerException));
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="logfilename"></param>
        public ReportProcessor(string logfilename, ArgumentContainer _ArgumentContainer)
        {
            _reportDoc   = new ReportDocument();
            _logfilename = logfilename;
            _logger      = new LogWriter(_logfilename, _ArgumentContainer.EnableLogToConsole);

            ReportArguments = _ArgumentContainer;
        }
示例#4
0
        /// <summary>
        /// Constructor
        /// </summary>
        public ReportProcessor()
        {
            ReportArguments = new ArgumentContainer();

            _reportDoc = new ReportDocument();
        }