Exemple #1
0
 public void ClientCode(Creator creator)
 {
     Console.WriteLine("Client: I'm not aware of the creator's class," +
                       "but it still works.\n" + creator.SomeOperation());
     Console.ReadLine();
 }
Exemple #2
0
        public void DoSomething(Creator creator)
        {
            Tea tea = creator.FactoryMethod();

            Console.WriteLine(tea.Name + " added in database");
        }