예제 #1
0
        static void Main(string[] args)
        {
            MachineFactory <ILogService> logservice = new MachineFactory <ILogService>();
            var logDbService = logservice.CreateInstance("logdbservice");

            logDbService.Save();

            Console.Read();
        }
예제 #2
0
        private static void Main(string[] args)
        {
            string   description = args[0];
            IMachine machine     = new MachineFactory().CreateInstance(description);

            machine.TurnOn();
            machine.TurnOff();

            Console.ReadKey();
        }