public void Assemble(AbstractBuilder sandwichBuilder)
 {
     sandwichBuilder.AddBread();
     sandwichBuilder.AddMeats();
     sandwichBuilder.AddCheese();
     sandwichBuilder.AddVeggies();
     sandwichBuilder.AddCondiments();
 }
Exemple #2
0
 public Casa(int numeroDePuerta, int superficie, int cantidadDeHabitantes, Director director, AbstractBuilder constructor)
 {
     _numeroDePuerta       = numeroDePuerta;
     _superficie           = superficie;
     _cantidadDeHabitantes = cantidadDeHabitantes;
     this.director         = director;
     this.constructor      = constructor;
 }
Exemple #3
0
 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;
 }
Exemple #4
0
        // 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();
        }
Exemple #6
0
 public Director(AbstractBuilder abstractBuilder)
 {
     _abstractBuilder = abstractBuilder;
 }
 public Director(AbstractBuilder builder)
 {
     this.builder = builder;
 }
 protected EzyDecodeHandlers(AbstractBuilder builder)
 {
     this.state    = firstState();
     this.handlers = builder.newHandlers();
 }
Exemple #9
0
 public Foreman(AbstractBuilder builder)
 {
     this.builder = builder;
 }
 public Director(AbstractBuilder builder)
 {
     _builder = builder;
 }
Exemple #11
0
 /// <summary>
 /// 组装电脑
 /// </summary>
 /// <param name="abstractBuilder">建造者</param>
 public void Construct(AbstractBuilder abstractBuilder)
 {
     abstractBuilder.BuildPartCPU();
     abstractBuilder.BuildPartMainBoard();
 }
Exemple #12
0
 public void SetBuilder(AbstractBuilder builder)
 {
     _builder = builder;
 }
 public void ChangeBuilderTo(AbstractBuilder builder)
 {
     _builder = builder;
 }