Ejemplo n.º 1
0
        static void Main(string[] args)

        //gerçek hayatla ilişkilenrime yapamdım.
        {
            ProductDirector productDirector = new ProductDirector();

            productDirector.GenerateProduct(new NewCustomerProductBuilder());

            ProductDirector productDirector2 = new ProductDirector();
            var             builder          = new OldCustomerProductBuilder();

            productDirector2.GenerateProduct(builder);
            var model = builder.GetModel();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            ProductDirector director = new ProductDirector();
            var             builder  = new NewCustomerProductBuilder();

            director.GenerateProduct(builder);
            var model = builder.GetModel();

            Console.WriteLine(model.Id);
            Console.WriteLine(model.CategoryName);
            Console.WriteLine(model.DiscountApplylied);
            Console.WriteLine(model.CategoryName);

            Console.WriteLine(model.ProductName);
            Console.WriteLine(model.UnitPrice);
        }