コード例 #1
0
        public override void DeleteBeverage(string beverage)
        {
            switch (beverage)
            {
            case "Esspresso":
                singleton.Instance.YalovaBeveragesTypes["Esspresso"] = false;
                Esspresso esspresso = new Esspresso();
                EsspressoType.RemoveAll(x => x.GetType() == typeof(Esspresso));
                break;

            case "Americano":
                singleton.Instance.YalovaBeveragesTypes["Americano"] = false;
                EsspressoType.RemoveAll(x => x.GetType() == typeof(Americano));
                break;

            case "Caffe":
                singleton.Instance.YalovaBeveragesTypes["Caffe"] = false;
                EsspressoType.RemoveAll(x => x.GetType() == typeof(Caffe));
                break;

            case "Cappuccino":
                singleton.Instance.YalovaBeveragesTypes["Cappuccino"] = false;
                EsspressoType.RemoveAll(x => x.GetType() == typeof(Cappuccino));
                break;

            case "Filtered Coffee":
                singleton.Instance.YalovaBeveragesTypes["Filtered Coffee"] = false;
                FilteredCoffeeType.RemoveAll(x => x.GetType() == typeof(FilteredCoffee));
                break;

            case "Misto":
                singleton.Instance.YalovaBeveragesTypes["Misto"] = false;
                FilteredCoffeeType.RemoveAll(x => x.GetType() == typeof(Misto));
                break;

            case "Brew":
                singleton.Instance.YalovaBeveragesTypes["Brew"] = false;
                FilteredCoffeeType.RemoveAll(x => x.GetType() == typeof(Brew));
                break;

            case "Frappuccino":
                singleton.Instance.YalovaBeveragesTypes["Frappuccino"] = false;
                FrappuccinoType.RemoveAll(x => x.GetType() == typeof(Frappuccino));
                break;

            case "Chocolate Frap":
                singleton.Instance.YalovaBeveragesTypes["Chocolate Frap"] = false;
                FrappuccinoType.RemoveAll(x => x.GetType() == typeof(ChocolateFrap));
                break;

            case "Strawberry Frap":
                singleton.Instance.YalovaBeveragesTypes["Strawberry Frap"] = false;
                FrappuccinoType.RemoveAll(x => x.GetType() == typeof(StrawberryFrap));
                break;

            case "Vanilla Frap":
                singleton.Instance.YalovaBeveragesTypes["Vanilla Frap"] = false;
                FrappuccinoType.RemoveAll(x => x.GetType() == typeof(VanillaFrap));
                break;

            default:
                break;
            }
        }
コード例 #2
0
        public override void AddBeverage(string beverage)
        {
            switch (beverage)
            {
            case "Esspresso":
                singleton.Instance.YalovaBeveragesTypes["Esspresso"] = true;
                EsspressoType.Add(new Esspresso());
                break;

            case "Americano":
                singleton.Instance.YalovaBeveragesTypes["Americano"] = true;
                EsspressoType.Add(new Americano());
                break;

            case "Caffe":
                singleton.Instance.YalovaBeveragesTypes["Caffe"] = true;
                EsspressoType.Add(new Caffe());
                break;

            case "Cappuccino":
                singleton.Instance.YalovaBeveragesTypes["Cappuccino"] = true;
                EsspressoType.Add(new Cappuccino());
                break;

            case "Filtered Coffee":
                singleton.Instance.YalovaBeveragesTypes["Filtered Coffee"] = true;
                FilteredCoffeeType.Add(new FilteredCoffee());
                break;

            case "Misto":
                singleton.Instance.YalovaBeveragesTypes["Misto"] = true;
                FilteredCoffeeType.Add(new Misto());
                break;

            case "Brew":
                singleton.Instance.YalovaBeveragesTypes["Brew"] = true;
                FilteredCoffeeType.Add(new Brew());
                break;

            case "Frappuccino":
                singleton.Instance.YalovaBeveragesTypes["Frappuccino"] = true;
                FrappuccinoType.Add(new Frappuccino());
                break;

            case "Chocolate Frap":
                singleton.Instance.YalovaBeveragesTypes["Chocolate Frap"] = true;
                FrappuccinoType.Add(new ChocolateFrap());
                break;

            case "Strawberry Frap":
                singleton.Instance.YalovaBeveragesTypes["Chocolate Frap"] = true;
                FrappuccinoType.Add(new StrawberryFrap());
                break;

            case "Vanilla Frap":
                singleton.Instance.YalovaBeveragesTypes["Chocolate Frap"] = true;
                FrappuccinoType.Add(new VanillaFrap());
                break;

            default:
                break;
            }
        }