Пример #1
0
        public void Execute(T state)
        {
            lock (_syncRoot)
            {
                if (_isExecuting)
                {
                    return;
                }

                _isExecuting = true;
            }

            IChainStep <T> head;

            if (_isFrozen && _head != null)
            {
                head = _head;
            }
            else
            {
                head = ComputeChainSequence();

                if (_isFrozen)
                {
                    _head = head;
                }
            }

            _head.Execute(state);

            lock (_syncRoot)
                _isExecuting = false;
        }
Пример #2
0
        public void Execute(T state)
        {
            ExecuteOverride(state);

            if (!CancelExecution && _successor != null)
            {
                _successor.Execute(state);
            }
        }
Пример #3
0
        public bool Execute(T msg)
        {
            if (Handle(msg))
            {
                if (nextStep != null)
                {
                    return(nextStep.Execute(msg));
                }
            }

            return(false);
        }
Пример #4
0
 public void Execute(T msg)
 {
     firstStep?.Execute(msg);
 }