コード例 #1
0
 public void Case3()
 {
     AbstractOrInterfaceOfCreator creator1 = new GenericConcreteCreator <ConcreteGoodProduct>();
     AbstractOrInterfaceOfCreator creator2 = new GenericConcreteCreator <ConcreteBadProduct>();
     AbstractOrInterfaceOfProduct product1 = creator1.CreateProduct();
     AbstractOrInterfaceOfProduct product2 = creator2.CreateProduct();
 }
コード例 #2
0
 public void Case1()
 {
     AbstractOrInterfaceOfCreator creator = new ConcreteCreator();
     AbstractOrInterfaceOfProduct product = creator.CreateProduct();
 }
コード例 #3
0
 public void Case3()
 {
   ConcreteCreator creator = new ConcreteCreator();
   AbstractOrInterfaceOfProduct product = creator.CreateProduct(ProductCategory.GoodProduct);
 }