예제 #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();
        }
예제 #2
0
파일: Program.cs 프로젝트: frtlec/CsharpOop
        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);
        }