public override Task Start(CancellationToken cancellation) { if (StateDFA.Change(ProgressState.Progressing)) { NextStart(); } return(_taskCompletion.Task); }
public override void Suspend() { if (StateDFA.Change(ProgressState.Suspend)) { foreach (var item in _items) { if (item.SetState(ProgressState.Suspend)) { item.SetState(ProgressState.Ready); } } } }