예제 #1
0
파일: Program.cs 프로젝트: nabodhe/CSharp
        private static void CreateAndDisplayCar(ref IVehicleFactory factory)
        {
            factory = AutoMBuilder.Build(BodyType.Car);

            IVehicle vehicle = factory.GetVehicle(IgnitionType.Automatic.ToString());

            WriteLine($" Vehicle {factory.ToString()}");

            vehicle = factory.GetVehicle(IgnitionType.Hybrid.ToString());
            WriteLine($" Vehicle {factory.ToString()}");

            vehicle = factory.GetVehicle(IgnitionType.None.ToString());
            WriteLine($" Vehicle {factory.ToString()}");

            ReadKey();
        }