public CoffeeFlavor getCoffeeFlavor(String flavorName) { if (flavors.ContainsKey (flavorName)) return flavors [flavorName]; var flavor = new CoffeeFlavor (flavorName); flavors.Add (flavorName, flavor); return flavor; }
public CoffeeFlavor getCoffeeFlavor(String flavorName) { if (flavors.ContainsKey(flavorName)) { return(flavors [flavorName]); } var flavor = new CoffeeFlavor(flavorName); flavors.Add(flavorName, flavor); return(flavor); }