Exemplo n.º 1
0
 public void Abort(Exception ex)
 {
     lock (_protocolSelectionLock)
     {
         _requestProcessor?.Abort(ex);
         _requestProcessor = null;
     }
 }
Exemplo n.º 2
0
        private void Abort(ConnectionAbortedException ex)
        {
            lock (_protocolSelectionLock)
            {
                switch (_protocolSelectionState)
                {
                case ProtocolSelectionState.Initializing:
                    CloseUninitializedConnection(ex);
                    break;

                case ProtocolSelectionState.Selected:
                    _requestProcessor.Abort(ex);
                    break;

                case ProtocolSelectionState.Aborted:
                    break;
                }

                _protocolSelectionState = ProtocolSelectionState.Aborted;
            }
        }
Exemplo n.º 3
0
        private void Abort(ConnectionAbortedException ex)
        {
            ProtocolSelectionState previousState;

            lock (_protocolSelectionLock) {
                previousState = _protocolSelectionState;
                Debug.Assert(previousState != ProtocolSelectionState.Initializing, "The state should never be initializing");

                _protocolSelectionState = ProtocolSelectionState.Aborted;
            }

            switch (previousState)
            {
            case ProtocolSelectionState.Selected:
                _requestProcessor.Abort(ex);
                break;

            case ProtocolSelectionState.Aborted:
                break;
            }
        }
Exemplo n.º 4
0
        public void Abort(Exception ex)
        {
            lock (_protocolSelectionLock)
            {
                switch (_protocolSelectionState)
                {
                case ProtocolSelectionState.Initializing:
                    CloseUninitializedConnection();
                    break;

                case ProtocolSelectionState.Selected:
                case ProtocolSelectionState.Stopping:
                    _requestProcessor.Abort(ex);
                    break;

                case ProtocolSelectionState.Stopped:
                    break;
                }

                _protocolSelectionState = ProtocolSelectionState.Stopped;
            }
        }
Exemplo n.º 5
0
        private void Abort(ConnectionAbortedException ex)
        {
            ProtocolSelectionState previousState;

            lock (_protocolSelectionLock)
            {
                previousState           = _protocolSelectionState;
                _protocolSelectionState = ProtocolSelectionState.Aborted;
            }

            switch (previousState)
            {
            case ProtocolSelectionState.Initializing:
                _context.ConnectionContext.Abort(ex);
                break;

            case ProtocolSelectionState.Selected:
                _requestProcessor.Abort(ex);
                break;

            case ProtocolSelectionState.Aborted:
                break;
            }
        }