public override StateResult DoAction() { if (context.HourOfDay >= 20) { return(ReturnState <Tired>()); } NextHour(); // this is how we'd simulate an failure which we would want to retry 'later' if (context.HourOfDay == 19) { Console.WriteLine($"HANG ON!!! WE COULDN'T TELL WHAT TIME IT IS!!!"); return(StateResult.Retry()); } return(ReturnState <Awake>()); }