private void EventDeviceAdded(object sender, DeviceList.EventArgsDevice e) { if (e.Device.Name == iFriendlyName) { lock (this) { iService = new ServiceProduct(e.Device); iAction = iService.CreateAsyncActionProduct(); iAction.EventResponse += EventResponse; iThread = new Thread(Run); iThread.Name = "TestRunner"; iThread.IsBackground = true; iThread.Start(); } } }