Example #1
0
        public static IKitchen GetCook(CookName CookName)
        {
            IKitchen kitchen = null;

            switch (CookName)
            {
            case CookName.鱼香肉丝:
                kitchen = new YXRSCook();
                break;

            case CookName.宫保鸡丁:
                kitchen = new GBJDCook();
                break;

            default:
                break;
            }
            return(kitchen);
        }
Example #2
0
 public Restaurant(IKitchen kitchen)
 {
     _kitchen = kitchen;
 }
Example #3
0
 public CartController(IKitchen service, Cart cart)
 {
     this.service = service;
     this.cart    = cart;
 }