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