private void StartServiceHost(CommandLine commandLine) { Console.WriteLine("-> service will listen for connection on " + commandLine.Binding); Console.WriteLine("-> service will identify controls using " + commandLine.AutomationIdentification); _serviceHost = new ServiceHostController { AutomationIdentification = commandLine.AutomationIdentification }; _serviceHost.Trace += (sender, args) => Console.WriteLine("-> " + args.Message); _serviceHost.Start(new Uri(commandLine.Binding)); Console.WriteLine("-> service started"); Console.WriteLine(); }
protected void StartPhoneAutomationController(AutomationIdentification automationIdentification, Uri bindingAddress) { try { var hostController = new ServiceHostController() { AutomationIdentification = automationIdentification, }; hostController.Trace += (sender, args) => InvokeTrace(args); hostController.Start(bindingAddress); _hostController = hostController; } catch (Exception exception) { throw new AutomationException("Failed to start ApplicationAutomationController", exception); } }