예제 #1
0
        protected override Product FactoryMethod()
        {
            var concreteProductA = new ConcreteProductA();

            //here you can add additional code for product A

            return(concreteProductA);
        }
예제 #2
0
        public void Run()
        {
            ABuilder ab = new ABuilder();

            ab
            .AddField1()
            .AddField2();
            ConcreteProductA a = ab.Build();
        }
예제 #3
0
 public ABuilder()
 {
     this.p = new ConcreteProductA();
 }