Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        MyDirector       theDirector = new MyDirector();
        MyBuilderProduct product     = null;

        theDirector.Construct(new MyConBuilderA());
        product = theDirector.GetResult();
        product.ShowProduct();
    }
Exemplo n.º 2
0
 public void Construct(MyBuilder theBuilder)
 {
     m_Product = new MyBuilderProduct();
     theBuilder.BuildPart1(m_Product);
     theBuilder.BuildPart2(m_Product);
 }
Exemplo n.º 3
0
 public abstract void BuildPart2(MyBuilderProduct theProduct);
Exemplo n.º 4
0
 public override void BuildPart2(MyBuilderProduct theProduct)
 {
     theProduct.AddPart("BBBBB2222222222222222222");
 }
Exemplo n.º 5
0
 public override void BuildPart1(MyBuilderProduct theProduct)
 {
     theProduct.AddPart("BBBB11111111111111");
 }