public ZeusRestoApi() : base(BASE_URL, API_PATH) { this.restoMenus = new Dictionary <DateTime, DailyMenu>(); this.sandwichMenu = new SandwichMenu() { Sandwiches = null }; }
public static void Main(string[] args) { var sandwichMenu = new SandwichMenu(); sandwichMenu["BLT"] = new Sandwich("Wheat", "Bacon", "", "Lettuce, Tomato"); sandwichMenu["PB&J"] = new Sandwich("White", "", "", "Peanut Butter, Jelly"); sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); var sandwich1 = sandwichMenu["BLT"].Clone() as Sandwich; var sandwich2 = sandwichMenu["PB&J"].Clone() as Sandwich; var sandwich3 = sandwichMenu["Turkey"].Clone() as Sandwich; }
public static void Main(string[] args) { var sandwichMenu = new SandwichMenu(); // Initialize with default sandwiches sandwichMenu["BLT"] = new Sandwich("Wheat", "Becon", "", "Tomato"); sandwichMenu["PB&J"] = new Sandwich("White", "", "", "Peanut Butter, Jelly"); sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); // Now we can clone these sandwiches var sandwich1 = sandwichMenu["BLT"].Clone() as Sandwich; var sandwich2 = sandwichMenu["PB&J"].Clone() as Sandwich; var sandwich3 = sandwichMenu["Turkey"].Clone() as Sandwich; }
static void Main(string[] args) { // Prototype var sandwichMenu = new SandwichMenu(); sandwichMenu["BLT"] = new Sandwich("Wheat", "Bacon", "", "Lettuce, Tomato"); sandwichMenu["PB&J"] = new Sandwich("White", "", "", "Peanut Butter, Jelly"); sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); sandwichMenu["LoadedBLT"] = new Sandwich("Wheat", "Turkey, Bacon", "American", "Lettuce, Onion, Tomato, Olives"); sandwichMenu["ThreeMeatCombo"] = new Sandwich("Rye", "Turkey, Ham, Bacon", "Provolone", "Lettuce, Onion"); sandwichMenu["Vegetarian"] = new Sandwich("Wheat", "", "", "Lettuce, Onion, Tomato, Olives, Spinach"); var sandwich1 = sandwichMenu["BLT"].Clone() as Sandwich; var sandwich2 = sandwichMenu["ThreeMeatCombo"].Clone() as Sandwich; var sandwich3 = sandwichMenu["Vegetarian"].Clone() as Sandwich; // Composite var phone = new SingleGift("Phone", 256); phone.CalculateTotalPrice(); Console.WriteLine(); var rootBox = new CompositeGift("RootBox", 0); var truckToy = new SingleGift("TruckToy", 289); var plainToy = new SingleGift("PlainToy", 587); rootBox.Add(truckToy); rootBox.Add(plainToy); var childBox = new CompositeGift("ChildBox", 0); var soldierToy = new SingleGift("SoldierToy", 200); childBox.Add(soldierToy); rootBox.Add(childBox); Console.WriteLine($"Total price of this composite present is: {rootBox.CalculateTotalPrice()}"); // TemplatePattern var sourdough = new Sourdough(); sourdough.Make(); var twelveGrain = new TwelveGrain(); twelveGrain.Make(); var wholeWheat = new WholeWheat(); wholeWheat.Make(); }
public static void Main() { var sandwichMenu = new SandwichMenu(); sandwichMenu["BLT"] = new Sandwich("Wheat", "Bacon", "Lettuce", "Tomato"); sandwichMenu["PB&J"] = new Sandwich("Wheat", "", "", "Peanut Butter, Jelly"); sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); sandwichMenu["LoadedBLT"] = new Sandwich("Wheat", "Turkey, Bacon", "American", "Lettuce, Tomato, Onion, Olives"); sandwichMenu["ThreeMeatCombo"] = new Sandwich("Rye", "Turkey, Ham, Salami", "Provolone", "Lettuce, Onion"); sandwichMenu["Vegeterian"] = new Sandwich("Wheat", "", "", "Lettuce, Onion, Tomato, Olives, Spinach"); var firstSandwich = sandwichMenu["BLT"].Clone() as Sandwich; var secondSandwich = sandwichMenu["ThreeMeatCombo"].Clone() as Sandwich; var thirdSandwich = sandwichMenu["Vegeterian"].Clone() as Sandwich; }
static void Main(string[] args) { SandwichMenu sandwichMenu = new SandwichMenu(); sandwichMenu["BLT"] = new Sandwich("Wheat", "Bacon", "", "Lettuce, Tomato"); sandwichMenu["PB&J"] = new Sandwich("White", "", "", "Peanut Butter, Jelly"); sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); sandwichMenu["LoadedBLT"] = new Sandwich("Wheat", "Turkey, Bacon", "American", "Lettuce, Tomato, Onion, Olives"); sandwichMenu["ThreeMeatCombo"] = new Sandwich("Rye", "Turkey, Ham, Salami", "Provolone", "Lettuce, Onion"); sandwichMenu["Vegetarian"] = new Sandwich("Wheat", "", "", "Lettuce, Onion, Tomato, Olives, Spinach"); Sandwich sandiwch1 = sandwichMenu["BLT"].Clone() as Sandwich; Sandwich sandwich2 = sandwichMenu["ThreeMeatCombo"].Clone() as Sandwich; Sandwich sandwich3 = sandwichMenu["Vegetarian"].Clone() as Sandwich; }
static void Main(string[] args) { SandwichMenu menu = new SandwichMenu(); //Default sandwiches menu["BLT"] = new Sandwich("Wheat", "Bacon", "", "Lettuce, Tomato"); menu["PB&J"] = new Sandwich("White", "", "", "Peanut Butte, Jelly"); menu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); //Custom sandwiches menu["LoadedBLT"] = new Sandwich("Wheat", "Turkey, Bacon", "American", "Lettuce, Tomato, Onion, Olives"); menu["ThreeMeatCombo"] = new Sandwich("Rye", "Turkey, Ham, Salami", "Provolone", "Lettuce, Onion"); menu["Vegetarian"] = new Sandwich("Wheat", "", "", "Lettuce, Onion, Tomato, Olives, Spinach"); //We can clone those sandwiches Sandwich sandwich1 = menu["BLT"].Clone() as Sandwich; Sandwich sandwich2 = menu["ThreeMeatCombo"].Clone() as Sandwich; Sandwich sandwich3 = menu["Vegetarian"].Clone() as Sandwich; }
public static void Main() { SandwichMenu sandwichMenu = new SandwichMenu(); // Initialize with default sandwiches sandwichMenu["BLT"] = new Sandwich("Wheat", "Bacon", "", "Lettuce, Tomato"); sandwichMenu["PB&J"] = new Sandwich("White", "", "", "Peanut Butter, Jelly"); sandwichMenu["Turkey"] = new Sandwich("Rye", "Turkey", "Swiss", "Lettuce, Onion, Tomato"); // Deli manager adds custom sandwiches sandwichMenu["LoadedBLT"] = new Sandwich("Wheat", "Turkey, Bacon", "American", "Lettuce, Tomato, Onion, Olives"); sandwichMenu["ThreeMeatCombo"] = new Sandwich("Rye", "Turkey, Ham, Salami", "Provolone", "Lettuce, Onion"); sandwichMenu["Vegetarian"] = new Sandwich("Wheat", "", "", "Lettuce, Onion, Tomato, Olives, Spinach"); // Now we can clone these sandwiches Sandwich sandwichl = sandwichMenu["BLT"].Clone() as Sandwich; Sandwich sandwich2 = sandwichMenu["ThreeMeatCombo"].Clone() as Sandwich; Sandwich sandwich3 = sandwichMenu["Vegetarian"].Clone() as Sandwich; }