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