public void MakeSandwich()
 {
     _builder.CreateNewSandwich();
     _builder.PrepareBread();
     _builder.ApplyMeatAndCheese();
     _builder.ApplyVegetables();
     _builder.AddCondiments();
 }
示例#2
0
 public virtual void BuildSandwich()
 {
     builder.CreateNewSandwich();
     builder.PrepareBread();
     builder.ApplyMeatAndCheese();
     builder.ApplyVegetables();
     builder.AddCondiments();
 }
 public void buildSandwich()
 {
     builder.CreateNewSandwich();
     builder.prepareBread();
     builder.applyMeatAndCheese();
     builder.applyVegetables();
     builder.addCondiments();
 }
示例#4
0
 ///<inheritDoc/>
 public IDoneSandwich BuildSandwich()
 {
     _builder.CreateNewSandwich();
     _builder.SandwichName();
     _builder.PrepareBread();
     _builder.ApplyMeatAndCheese();
     _builder.ApplyVegetables();
     _builder.AddCondiments(_hasMayo, _hasMustard);
     return(this);
 }
        public Sandwich ConstructSandwich(SandwichBuilder sandwichBuilder)
        {
            sandwichBuilder.CreateNewSandwich();
            sandwichBuilder.SetSandwichType();
            sandwichBuilder.AddCondiments();
            sandwichBuilder.AddMeat();
            sandwichBuilder.AddVeggies();
            sandwichBuilder.PrepareSandwich();

            return(sandwichBuilder.GetSandwich());
        }