using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
using TINK.Model.Bikes.BikeInfoNS.DriveNS.EngineNS;
namespace TINK.Model.Bikes.BikeInfoNS.DriveNS
{
public enum DriveType
{
///
/// Bike without pedaling aid.
///
SoleHumanPowered,
///
/// pedal electric cycle: Pedaling is assisted by an electric engine.
///
Pedelec
}
public class DriveMutable
{
public DriveMutable(
IEngine engine = null,
IBattery battery = null)
{
if (engine == null)
{
Engine = new Engine();
Battery = new BatteryMutable(new Battery.Builder().Build());
Type = DriveType.SoleHumanPowered;
return;
}
Engine = engine;
Battery = new BatteryMutable(battery ?? new Battery.Builder().Build());
Type = DriveType.Pedelec;
}
///
/// Gets the type of the drive.
///
public DriveType Type { get; private set; }
///
/// Engine driving the bike.
///
public IEngine Engine { get; private set; }
///
/// Battery powering the engine.
///
public IBatteryMutable Battery { get; private set; }
}
}