Пример #1
0
        private static void Main(string[] args)
        {
            LogConfiguration.Initialize();
            if (args.Length == 0)
            {
                Console.WriteLine("usage: {0} --<start|init>", AppDomain.CurrentDomain.FriendlyName);
                Environment.Exit(1);
            }
            var debuggingEnv = Utils.TryReadEnvValue("DEBUGGING");

            if (debuggingEnv != null && debuggingEnv.ToLower().Equals("true"))
            {
                // if the runner is launched in DEBUG mode, let the debugger attach.
                var j = 0;
                while (!Debugger.IsAttached)
                {
                    j++;
                    //Trying to debug, wait for a debugger to attach
                    Thread.Sleep(100);
                    //Timeout, no debugger connected, break out into a normal execution.
                    if (j == 300)
                    {
                        break;
                    }
                }
            }
            var phase   = args[0];
            var command = GaugeCommandFactory.GetExecutor(phase);

            command.Execute();
        }
Пример #2
0
        private static void Main(string[] args)
        {
            LogConfiguration.Initialize();
            if (args.Length == 0)
            {
                Console.WriteLine("usage: {0} --<start|init>", AppDomain.CurrentDomain.FriendlyName);
                Environment.Exit(1);
            }
            var phase   = args[0];
            var command = GaugeCommandFactory.GetExecutor(phase);

            command.Execute();
        }