public static LightThemeGraphicalElementsFactory GetInstance() { if (_instance == null) { _instance = new LightThemeGraphicalElementsFactory(); } return(_instance); }
public void Main() { Console.WriteLine("Client: Testing client code with the first factory type..."); ClientMethod(LightThemeGraphicalElementsFactory.GetInstance()); Console.WriteLine(); Console.WriteLine("Client: Testing the same client code with the second factory type..."); ClientMethod(DarkThemeGraphicalElementsFactory.GetInstance()); }