コード例 #1
0
 public void BuildSandwich()
 {
     builder.CreateNewSandwich();
     builder.PrepareBread();
     builder.ApplyMeatAndCheese();
     builder.ApplyVegetables();
     builder.AddCondiments();
 }
コード例 #2
0
 // Builder uses a complex series of steps
 //
 public void Assemble(SandwichBuilder sandwichBuilder)
 {
     sandwichBuilder.AddBread();
     sandwichBuilder.AddMeats();
     sandwichBuilder.AddCheese();
     sandwichBuilder.AddVeggies();
     sandwichBuilder.AddCondiments();
 }