예제 #1
0
        static void Main(string[] args)
        {
            Stopwatch stopWatch = new Stopwatch();

            stopWatch.Start();


            ToppingsDTO toppings    = new ToppingsDTO();
            var         pedidoFeito = PedidoJson();

            toppings.realizaToppings(pedidoFeito, true);
            Thread.Sleep(200);
            stopWatch.Stop();
            TimeSpan ts          = stopWatch.Elapsed;
            string   elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
                                                 ts.Hours, ts.Minutes, ts.Seconds,
                                                 ts.Milliseconds / 10);

            Console.WriteLine("Pedido realizado com latencia de " + elapsedTime);

            ControleDeEntrega.AutomationCore.ControleDeEntrega enviaParaEntrega = new ControleDeEntrega.AutomationCore.ControleDeEntrega();
            enviaParaEntrega.DisponibilizaPratoAoCliente(ObjectExtensions.ToJson((Pedido)pedidoFeito));
        }
예제 #2
0
        static void Main(string[] args)
        {

            Stopwatch stopWatch = new Stopwatch();
            stopWatch.Start();
          

            ToppingsDTO toppings = new ToppingsDTO();
            var pedidoFeito = PedidoJson();
            toppings.realizaToppings(pedidoFeito, true);
            Thread.Sleep(200);
            stopWatch.Stop();
            TimeSpan ts = stopWatch.Elapsed;
            string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
                                        ts.Hours, ts.Minutes, ts.Seconds,
                                        ts.Milliseconds / 10);

            Console.WriteLine("Pedido realizado com latencia de " + elapsedTime);
            
            ControleDeEntrega.AutomationCore.ControleDeEntrega enviaParaEntrega = new ControleDeEntrega.AutomationCore.ControleDeEntrega();
            enviaParaEntrega.DisponibilizaPratoAoCliente(ObjectExtensions.ToJson((Pedido)pedidoFeito));

        }
예제 #3
0
 static Program()
 {
      fila = new Queue<Pedido>();
      toppingsDTO = new ToppingsDTO();
 }