Exemplo n.º 1
0
        private static void MakeBreakfastAsync()
        {
            Coffee cup = PourCoffee();

            //Task<Egg> getEggTask =
            Task <Egg> eggs = FryEggsAsync(2);

            Task <Bacon> bacon = FryBaconAsync(3);

            Toast toast = ToastBread(2);

            ApplyButter(toast);
            ApplyJam(toast);

            Juice oj = PourOJ();


            Console.WriteLine("Breakfast is ready!");
        }
Exemplo n.º 2
0
        private static void MakeBreakfast()
        {
            Coffee cup = PourCoffee();

            Egg eggs = FryEggs(2);

            eggs.Fry();

            Bacon bacon = FryBacon(3);

            bacon.fry();

            Toast toast = ToastBread(2);

            ApplyButter(toast);
            ApplyJam(toast);

            Juice oj = PourOJ();


            Console.WriteLine("Breakfast is ready!");
        }