Inheritance: CoffeeOrder
示例#1
0
 public CoffeeFlavor getCoffeeFlavor(String flavorName)
 {
     if (flavors.ContainsKey (flavorName))
         return flavors [flavorName];
     var flavor = new CoffeeFlavor (flavorName);
     flavors.Add (flavorName, flavor);
     return flavor;
 }
示例#2
0
        public CoffeeFlavor getCoffeeFlavor(String flavorName)
        {
            if (flavors.ContainsKey(flavorName))
            {
                return(flavors [flavorName]);
            }
            var flavor = new CoffeeFlavor(flavorName);

            flavors.Add(flavorName, flavor);
            return(flavor);
        }