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(); }
public void DoSomething(Creator creator) { Tea tea = creator.FactoryMethod(); Console.WriteLine(tea.Name + " added in database"); }