コード例 #1
0
        /// <summary>
        /// Aborts operation execution after error.
        /// It is impossible to restart execution after abort.
        /// </summary>
        public virtual void AbortExecute()
        {
            var next = this;
            while (next._next != null)
            {
                next.Status = ExecutionStatus.Aborted;
                next = next._next;
            }

            _current = _next;
            _next = null;
        }
コード例 #2
0
        /// <summary>
        /// Tries to start operation execution.
        /// It is possible to retrying execution several times.
        /// Interface implementation is responsible for counting the attempts.
        /// </summary>
        public virtual void StartExecute()
        {
            if (_current != this)
            {
                _next = _current;
                _current = this;
            }

            Status = ExecutionStatus.Started;
        }
コード例 #3
0
 /// <summary>
 /// Completes operation execution.
 /// </summary>
 public virtual void CompleteExecute()
 {
     _current = _next;
     _next = null;
     Status = ExecutionStatus.Completed;
 }