/// <summary>
        /// Starting main execution engine
        /// </summary>
        /// <param name="args"></param>
        private static void ProcessArgs(string[] args)
        {
            try
            {
                Log.Initialize(args[0]);
                MailSimSequence seq = ConfigurationFile.LoadSequenceFile(args[0]);

                if (seq == null)
                {
                    Log.Out(Log.Severity.Error, Process.GetCurrentProcess().ProcessName, "Unable to load sequence XML file {0}", args[0]);
                    return;
                }

                // initializes logging
                Log.LogFileLocation(seq.LogFileLocation);

                ExecuteSequence exeSeq = new ExecuteSequence(seq);

                exeSeq.Execute();
            }
            catch (Exception ex)
            {
                Log.Out(Log.Severity.Error, Process.GetCurrentProcess().ProcessName, "Error encountered\n" + ex.ToString());
            }
        }
示例#2
0
        /// <summary>
        /// Starting main execution engine
        /// </summary>
        /// <param name="args"></param>
        private static void ProcessSequense(string[] args, MailSimOptions options)
        {
            Log.Initialize(args[0]);
            MailSimSequence seq = ConfigurationFile.LoadSequenceFile(args[0]);

            if (seq == null)
            {
                Log.Out(Log.Severity.Error, Process.GetCurrentProcess().ProcessName, "Unable to load sequence XML file {0}", args[0]);
                return;
            }

            ExecuteSequence exeSeq = new ExecuteSequence(seq, options);

            // initializes logging
            Log.LogFileLocation(seq.LogFileLocation);

            exeSeq.Execute();
        }
        /// <summary>
        /// Starting main execution engine
        /// </summary>
        /// <param name="args"></param>
        private static void ProcessSequense(string[] args, MailSimOptions options)
        {
            Log.Initialize(args[0]);
            MailSimSequence seq = ConfigurationFile.LoadSequenceFile(args[0]);

            if (seq == null)
            {
                Log.Out(Log.Severity.Error, Process.GetCurrentProcess().ProcessName, "Unable to load sequence XML file {0}", args[0]);
                return;
            }

            ExecuteSequence exeSeq = new ExecuteSequence(seq, options);

            // initializes logging
            Log.LogFileLocation(seq.LogFileLocation);

            exeSeq.Execute();
        }
        /// <summary>
        /// Starting main execution engine
        /// </summary>
        /// <param name="args"></param>
        private static void ProcessArgs(string[] args)
        {
            try
            {
                Log.Initialize(args[0]);
                MailSimSequence seq = ConfigurationFile.LoadSequenceFile(args[0]);

                if (seq == null)
                {
                    Log.Out(Log.Severity.Error, Process.GetCurrentProcess().ProcessName, "Unable to load sequence XML file {0}", args[0]);
                    return;
                }

                // initializes logging
                Log.LogFileLocation(seq.LogFileLocation);

                ExecuteSequence exeSeq = new ExecuteSequence(seq);

                exeSeq.Execute();
            }
            catch (Exception ex)
            {
                Log.Out(Log.Severity.Error, Process.GetCurrentProcess().ProcessName, "Error encountered\n" + ex.ToString());
            }
        }