using Quadarax.Foundation.Core.Business.Processor.Enums; using Quadarax.Foundation.Core.Business.Processor.Exceptons; namespace Quadarax.Foundation.Core.Business.Processor.Task; public interface ITaskItem : ITaskItemData { #region *** Operations *** /// /// Re-Schedules inactive task to future and sets to (affects and ). /// /// Allowed state: , /// Set state to: /// /// When task state is invalid for operation. /// /// Interval to shift to future. /// Reason message to postpone. void Postpone(TimeSpan postponeInterval, string reason); /// /// Stops running task and sets to or /// or (target status is depends on input arguments).. /// /// Allowed state: /// Set state to: or or /// /// When task state is invalid for operation. /// /// Reason message to stop. /// If true, then will be set to otherwise to or . /// If true, then will be set to otherwise to . void Stop(string reason, bool willPause = true, bool willFail = false); /// /// Resets task to initial state and sets to . /// Uses current validity to re-calculate and to now + . /// /// Allowed state: , , , /// Set state to: /// /// When task state is invalid for operation. /// /// Reason to reset task. /// Postpone current validity from now. void Reset(string reason, TimeSpan postponeValid); /// /// Deletes task and sets to . /// /// Reason to delete current task. /// Flag is true, deletes task immediately (afters status change) void Delete(string reason, bool immediate = false); #endregion }