static async Task ShowRetries(RetryingExecutioner executioner) { await executioner.Setup(); for (int i = 0; i < 10; i++) { Console.WriteLine("Step {0}: trying to roll a 6...", i); await executioner.Retry(20); MustRoll6(); } Console.WriteLine("Phew!"); }
static void Main() { RetryingExecutioner executioner = new RetryingExecutioner(ShowRetries); executioner.Start(); }