Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Completes operation execution.
 /// </summary>
 public virtual void CompleteExecute()
 {
     _current = _next;
     _next = null;
     Status = ExecutionStatus.Completed;
 }