private void InitializeDevice() { try { OnUpdateStatus(this, "Initializing device."); _device = (JediOmniDevice)DeviceConstructor.Create(_deviceInfo); _preparationManager = new JediOmniPreparationManager(_device); _digitalSendExerciser = new DigitalSendExerciser(this, _device, _preparationManager); _ewsExerciser = new EwsExerciserViaSeleniumWebDriver(this, _device); _printExerciser = new PrintExerciser(this, _device); _snmpExerciser = new SnmpExerciser(this, _device); _uiExerciser = new UIExerciser(this, _device, _preparationManager); _webServicesExerciser = new WebServicesExerciser(this, _device); _preparationManager.InitializeDevice(true); } catch (Exception ex) { OnUpdateStatus(this, ex.ToString()); OnUpdateStatus(this, "Cleaning up."); _device?.Dispose(); // Log the error and re-throw. ExecutionServices.SystemTrace.LogError(ex); throw; } }
/// <summary> /// Dispose Cloud Connector /// </summary> public void Dispose() { LinkUI.Dispose(); Device.Dispose(); }
public void Dispose() { _device?.Dispose(); }