public static void Main(string[] args) { //Sandwich sandwich = new Sandwich(Sandwich.BreadType.Wheat, Sandwich.CheeseType.American, true, false, true, new List<string> { "Tomato", "Lettuce" }); //Sandwich kidSandwich = new Sandwich(); //kidSandwich.Bread = BuilderPattern.Sandwich.BreadType.Wheat; //kidSandwich.Cheese = BuilderPattern.Sandwich.CheeseType.Parmesan; //kidSandwich.HasMayo = true; //kidSandwich.HasMustard = false; //kidSandwich.IsToasted = true; //kidSandwich.Vegetables = new List<string> { "Tomato", "Lettuce", "Olives" }; //kidSandwich.Display(); //sandwich.Display(); //SandwichBuilder builder = new ClubSandwichBuilder(); //builder.CreateSandwich(); //Sandwich sandwich = builder.GetSandwich(); SandwichMaker maker = new SandwichMaker(new ClubSandwichBuilder()); maker.BuildSandwich(); Sandwich sandwich = maker.GetSandwich(); sandwich.Display(); }
public override void CreateSandwich() { _Sandwich = new Sandwich(); _Sandwich.BreadType = Bread.White; _Sandwich.CheeseType = Cheese.Cheddar; _Sandwich.IsToasted = false; _Sandwich.Vegetables.Add("Onion"); _Sandwich.Vegetables.Add("Tomato"); }
public override void CreateSandwich() { _Sandwich = new Sandwich(); _Sandwich.BreadType = Bread.Brown; _Sandwich.CheeseType = Cheese.Mayo; _Sandwich.IsToasted = true; _Sandwich.Vegetables.Add("Onion"); _Sandwich.Vegetables.Add("Lettuce"); }
static void Main(string[] args) { Console.WriteLine("---------------------------Club Sandwich------------------------------------"); var sandwichMaker = new SandwichMaker(new ClubSandwichBuilder()); Sandwich clubSandwich = sandwichMaker.MakeSandwich(); clubSandwich.Display(); Console.WriteLine("---------------------------Standard Sandwich------------------------------------"); sandwichMaker = new SandwichMaker(new StandardSandwichBuilder()); Sandwich standardSandwich = sandwichMaker.MakeSandwich(); standardSandwich.Display(); Console.ReadLine(); }
public void CreateSandwich() { this.sandwich = new Sandwich(); }
public void CreateSandwich() { sandwich = new Sandwich(); }
public HamAndCheese() { sandwich = new Sandwich("Ham and Cheese"); }
public BLT() { sandwich = new Sandwich("BLT"); }
public TurkeyClub() { sandwich = new Sandwich("Turkey Club"); }