Exemple #1
0
        public static async Task <Egg> FryEggsAsync(int N)
        {
            Egg egg = new Egg();
            await Task.Run(() => { egg.Fry(); });

            return(egg);
        }
Exemple #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!");
        }