public async static Task TestChefAsync(string text1AS, string text2AS, string text1S, string text2S, string textRes, int timeAS, int timeS, string nombreDelCliente) { var chef = new ChefAsync(); chef.PrepareMediaSyncFunction(text1S, text2S, timeS); var platoEntregaAsync = chef.PrepareMediaAsyncFunction(text1AS, text2AS, nombreDelCliente, timeAS); var platoEntrega = await platoEntregaAsync; Console.WriteLine("\tLa Pizza " + textRes + platoEntrega + " : Lista"); }
public async static Task TestChefAsync(string text1AS, string text2AS, string text1S, string text2S, string text3S, int timeAS, int timeS, string nombreDelCliente) { //Console.Clear(); var chef = new ChefAsync(); //var platoEntregaAsync = chef.Recibir(nombre); var chefSincrono = chef.PrepareMediaSyncFunction(text1S, text2S, text3S, timeS); Thread.Sleep(1000); var platoEntregaAsync = chef.PrepareMediaAsyncFunction(text1AS, text2AS, nombreDelCliente, timeAS); //var pedido = await meseroEntrega; var platoEntrega = await platoEntregaAsync; Console.WriteLine($"{platoEntrega} : Lista"); }