public void Assemble(AbstractBuilder sandwichBuilder) { sandwichBuilder.AddBread(); sandwichBuilder.AddMeats(); sandwichBuilder.AddCheese(); sandwichBuilder.AddVeggies(); sandwichBuilder.AddCondiments(); }
public Casa(int numeroDePuerta, int superficie, int cantidadDeHabitantes, Director director, AbstractBuilder constructor) { _numeroDePuerta = numeroDePuerta; _superficie = superficie; _cantidadDeHabitantes = cantidadDeHabitantes; this.director = director; this.constructor = constructor; }
public Plaza(int superficie, int cantidadDeArboles, int cantidadDeFarolas, Calle calle, Director director, AbstractBuilder constructor) { _superficie = superficie; _cantidadDeArboles = cantidadDeArboles; _cantidadDeFarolas = cantidadDeFarolas; _calle = calle; this.director = director; this.constructor = constructor; }
// imagine that calling this steps in this order is vital! public Unit ConstructUnit(AbstractBuilder builder) { builder.CreateUnit(); builder.SetUnitHealth(); builder.SetUnitArmour(); builder.SetUnitAttack(); builder.SetUnitCost(); return(builder.GetUnit()); }
// imagine that calling this steps in this order is vital! public Unit ConstructUnit(AbstractBuilder builder) { builder.CreateUnit(); builder.SetUnitHealth(); builder.SetUnitArmour(); builder.SetUnitAttack(); builder.SetUnitCost(); return builder.GetUnit(); }
public Director(AbstractBuilder abstractBuilder) { _abstractBuilder = abstractBuilder; }
public Director(AbstractBuilder builder) { this.builder = builder; }
protected EzyDecodeHandlers(AbstractBuilder builder) { this.state = firstState(); this.handlers = builder.newHandlers(); }
public Foreman(AbstractBuilder builder) { this.builder = builder; }
public Director(AbstractBuilder builder) { _builder = builder; }
/// <summary> /// 组装电脑 /// </summary> /// <param name="abstractBuilder">建造者</param> public void Construct(AbstractBuilder abstractBuilder) { abstractBuilder.BuildPartCPU(); abstractBuilder.BuildPartMainBoard(); }
public void SetBuilder(AbstractBuilder builder) { _builder = builder; }
public void ChangeBuilderTo(AbstractBuilder builder) { _builder = builder; }