Exemple #1
0
        public ReturnState Startup(string[] args)
        {
            ReturnState argsVerification = _argsVerifyer.VerifyArgs(args);

            if (argsVerification == ReturnState.Ok)
            {
                var       customerResponse = _customerService.GetCustomer(args[0]);
                ICustomer currentCustomer  = customerResponse.Entity;

                var servingResponse = _customerAttendant.AttendCustomer(currentCustomer, args[1]);

                List <IProduct> orderedProducts = new List <IProduct>();
                if (servingResponse.Success)
                {
                    orderedProducts = servingResponse.Entity.ToList();
                }
                decimal price = currentCustomer.CalculateDiscount();
            }
            else
            {
                return(argsVerification);
            }
            return(ReturnState.Ready);
        }