Ejemplo n.º 1
0
        public void Close()
        {
            if (_infoService == null)
                return;

            ValidateUsedConnection();

            try
            {
                _infoService.Close();
            }
            catch (TimeoutException exception)
            {
                _infoService.Abort();
                _log.Error("Error closing exception.", exception);
            }
            catch (CommunicationException exception)
            {
                _infoService.Abort();
                _log.Error("Error closing exception.", exception);
            }

            _infoService = null;
        }
Ejemplo n.º 2
0
        public void Open()
        {
            try
            {
                if (_infoService == null)
                {
                    if (_activityMonitor != null)
                        _activityMonitor.Reset();

                    _infoService = _channelFactory.CreateChannel();

                    _infoService.OperationTimeout = _operationTimeout;
                    _infoService.Open();
                }
            }
            catch (Exception ex)
            {
                _log.Error("An error occured opening a connection to the orion communication service.", ex);
                throw;
            }
        }