/// <summary> /// Ends or suspends the current task. /// </summary> protected virtual void SuspendTask() { StateCache.RemoveFromCache(State.TaskId); State.Clear(); }
/// <summary> /// Completes the task. Completing a task permanently removes any state data for the task. /// A completed task cannot be restarted. /// </summary> public virtual void CompleteTask() { StateCache.RemoveFromCache(State.TaskId); State.Delete(); }