Beispiel #1
0
        static void Main(string[] args)
        {
            ProcessDriver processDriver = new ProcessDriver();

            Process1 process1 = new Process1(args);

            processDriver.SetObject(process1);

            Process2 process2 = new Process2(args);

            processDriver.SetObject(process2);

            //Process3 process3 = new Process3(args);
            //processDriver.SetObject(process3);

            //Process4 process4 = new Process4(args);
            //processDriver.SetObject(process4);

            string message = "\r\n" + string.Join("\r\n", processDriver.Times);

            Console.WriteLine(message);

#if DEBUG
            Console.Write("\r\nPress <enter> to continue: ");
            Console.ReadLine();
#endif
        }
Beispiel #2
0
        public static void Main(string[] args)
        {
            try
            {
                Title    = args[0];
                Item     = args[1];
                Property = args[2];

                ProcessDriver processDriver = new ProcessDriver();

                Process1 process1 = new Process1();
                processDriver.SetObject(process1);

                Process2 process2 = new Process2();
                processDriver.SetObject(process2);

                Process3 process3 = new Process3();
                processDriver.SetObject(process3);

                Process4 process4 = new Process4();
                processDriver.SetObject(process4);

                string message = "\r\n" + string.Join("\r\n", processDriver.Times);
                Console.WriteLine(message);
            }
            catch (WebException ex)
            {
                string path    = Path.GetTempPath();
                string file    = "Error.log";
                string message = DateTime.Now + " " + ex.Message + "\r\n";
                File.AppendAllText(Path.Combine(path, file), message);
                Console.WriteLine(ex.Message);
            }
            catch (ApplicationException)
            {
                string message = "No values found for\r\n\r\n" +
                                 "Parameter1: " + Title + "\r\nParameter2: " + Item + "\r\nParameter3: " + Property;
                Console.WriteLine(message);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

#if DEBUG
            Console.Write("\r\nPress <enter> to continue: ");
            Console.ReadLine();
#endif
        }