Пример #1
0
 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);
         }
     }
 }
Пример #2
0
 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);
         }
     }
 }
Пример #3
0
 private static async void HandleOdd(Coordinator coordinator, int value)
 {
     await coordinator.Gosub(Print, value + " is odd");
 }
Пример #4
0
 private static async void HandleEven(Coordinator coordinator, int value)
 {
     await coordinator.Gosub(Print, value + " is even");
 }
Пример #5
0
 private static async void HandleOdd(Coordinator coordinator, int value)
 {
     await coordinator.Gosub(Print, value + " is odd");
 }
Пример #6
0
 private static async void HandleEven(Coordinator coordinator, int value)
 {
     await coordinator.Gosub(Print, value + " is even");
 }