Example #1
0
        public static LightThemeGraphicalElementsFactory GetInstance()
        {
            if (_instance == null)
            {
                _instance = new LightThemeGraphicalElementsFactory();
            }

            return(_instance);
        }
Example #2
0
        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());
        }