Ejemplo n.º 1
0
 /// <summary>
 /// Ends or suspends the current task.
 /// </summary>
 protected virtual void SuspendTask()
 {
     StateCache.RemoveFromCache(State.TaskId);
     State.Clear();
 }
Ejemplo n.º 2
0
 /// <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();
 }