Пример #1
0
        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;
            }
        }
Пример #2
0
 /// <summary>
 /// Dispose Cloud Connector
 /// </summary>
 public void Dispose()
 {
     LinkUI.Dispose();
     Device.Dispose();
 }
Пример #3
0
 public void Dispose()
 {
     _device?.Dispose();
 }