private static async void EntryPoint(Coordinator coordinator) { for (int i = 0; i < 10; i++) { if (i % 2 == 0) { Console.WriteLine("Gosub HandleEven"); await coordinator.Gosub(HandleEven, i); } else { Console.WriteLine("Gosub HandleEven"); await coordinator.Gosub(HandleOdd, i); } } }
private static async void HandleOdd(Coordinator coordinator, int value) { await coordinator.Gosub(Print, value + " is odd"); }
private static async void HandleEven(Coordinator coordinator, int value) { await coordinator.Gosub(Print, value + " is even"); }