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); }
public Restaurant(IKitchen kitchen) { _kitchen = kitchen; }
public CartController(IKitchen service, Cart cart) { this.service = service; this.cart = cart; }