private void StartDriver(ParsedInitialisationString parsedInitialisationString)
 {
     var driverConfiguration = new AdbDeviceControllerConfiguration(parsedInitialisationString.Fields);
     var driver = new AdbDeviceController(driverConfiguration);
     driver.Trace += (sender, args) => InvokeTrace(args);
     if (!driver.TryConnect())
         throw new AutomationException("Unable to connect to Android emulator driver");
     DeviceController = driver;
 }
        private void StartDriver(ParsedInitialisationString parsedInitialisationString)
        {
            var driverConfiguration = new AdbDeviceControllerConfiguration(parsedInitialisationString.Fields);
            var driver = new AdbDeviceController(driverConfiguration);

            driver.Trace += (sender, args) => InvokeTrace(args);
            if (!driver.TryConnect())
            {
                throw new AutomationException("Unable to connect to Android emulator driver");
            }
            DeviceController = driver;
        }
        public void Start(string initialisationString = null, AutomationIdentification automationIdentification = AutomationIdentification.TryEverything)
        {
            if (_hostController != null)
                throw new InvalidOperationException("hostController already initialised");

            if (DeviceController != null)
                throw new InvalidOperationException("Driver already initialised");

            var parsedInitialisationString = new ParsedInitialisationString(initialisationString);

            var bindingAddressUrl = parsedInitialisationString.SafeGetValue("BindingAddress");
            var bindingAddressUri = string.IsNullOrEmpty(bindingAddressUrl) ? null : new Uri(bindingAddressUrl);

            StartDriver(parsedInitialisationString);
            StartPhoneAutomationController(automationIdentification, bindingAddressUri);
        }
        public void Start(string initialisationString = null, AutomationIdentification automationIdentification = AutomationIdentification.TryEverything)
        {
            if (_hostController != null)
            {
                throw new InvalidOperationException("hostController already initialised");
            }

            if (DeviceController != null)
            {
                throw new InvalidOperationException("Driver already initialised");
            }

            var parsedInitialisationString = new ParsedInitialisationString(initialisationString);

            var bindingAddressUrl = parsedInitialisationString.SafeGetValue("BindingAddress");
            var bindingAddressUri = new Uri(string.IsNullOrEmpty(bindingAddressUrl) ? DefaultBindingAddress : bindingAddressUrl);

            StartDriver(parsedInitialisationString);
            StartPhoneAutomationController(automationIdentification, bindingAddressUri);
        }