Esempio n. 1
0
        static async Task <Bacon> FryBaconAsync(int n)
        {
            Bacon bacon = new Bacon();
            await Task.Run(() => { bacon.fry(); });

            return(bacon);
        }
Esempio 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!");
        }