コード例 #1
0
 static void Main(string[] args)
 {
     string typeOfPizza = "spice";
     SimplePizzaFactory sf=new SimplePizzaFactory();
     PizzaStore ps = new PizzaStore(sf);
     ps.orderPizza(typeOfPizza);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: owenhuang91/DesignPattern
        static void Main(string[] args)
        {
            var factory = new SimplePizzaFactory();

            var pizzaStore = new PizzaStore(factory);
            pizzaStore.orderPizza("CheesePizza");
            pizzaStore.orderPizza("ClamPizza");
            Console.ReadLine();
        }