상속: CoffeeOrder
예제 #1
0
파일: CoffeeShop.cs 프로젝트: hamoriz/katas
 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);
        }