public Program(CommandLine commandLine) 
 {
     StartServiceHost(commandLine);
     var commands = new PhoneAutomationCommands()
                        {
                            ApplicationAutomationController = _serviceHost.AutomationController
                        };
     AddCommands(commands);
 }
        public Program(AppLaunchingCommandLine commandLine)
        {
            _commandLine = commandLine;
            StartEmuAutomationController();

            var driverCommands = new DeviceControllerCommands
                {
                    DeviceController = _automationController.DeviceController,
                    CommandLine = _commandLine
                };
            AddCommands(driverCommands);

            var inputCommands = new DisplayInputCommands
                {
                    DisplayInputController = _automationController.DisplayInputController
                };
            AddCommands(inputCommands);

            var phoneAutomationCommands = new PhoneAutomationCommands
                {
                    ApplicationAutomationController =
                        _automationController.ApplicationAutomationController
                };
            AddCommands(phoneAutomationCommands);
        }