Ejemplo n.º 1
0
        protected void SetBodyEngineObject(IVehicle vehicleObj, string vehicleType)
        {
            IgnitionType eIgnitionType = IgnitionType.None;

            Enum.TryParse(vehicleType, out eIgnitionType);
            var bodyObj    = vehicleObj.GetVehicleBody(BodyType.None);
            var engineType = vehicleObj.GetVehicleEngine(bodyObj, eIgnitionType);

            VehicleObject = vehicleObj;
            AutoBody      = bodyObj;
            EngineType    = engineType;
        }
Ejemplo n.º 2
0
 public string ToString(IAutoBody body, IAutoEngine engine)
 {
     return($" AutoBody { body?.ToString() } \r\n AutoEngine { engine?.ToString() } ");
 }