private void OnSupervision(Exception exception) { var decision = _currentStage.Decide(exception); switch (decision) { case Directive.Stop: FailStage(exception); break; case Directive.Resume: ResetAfterSupervise(); break; case Directive.Restart: ResetAfterSupervise(); _currentStage.PostStop(); _currentStage = (AbstractStage <TIn, TOut>)_currentStage.Restart(); _currentStage.PreStart(Context); break; default: throw new NotSupportedException($"PushPullGraphLogic doesn't support supervision directive {decision}"); } }
/// <summary> /// TBD /// </summary> public override void PreStart() => _currentStage.PreStart(Context);