mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-11-05 10:36:30 +01:00
31 lines
932 B
C#
31 lines
932 B
C#
using System;
|
|
using TINK.Model.Bikes.Bike.CopriLock;
|
|
|
|
namespace TINK.Model.Bike.CopriLock
|
|
{
|
|
public class BikeInfoMutable : BC.BikeInfoMutable, IBikeInfoMutable
|
|
{
|
|
/// <summary> Constructs a bike object from source. </summary>
|
|
public BikeInfoMutable(BikeInfo bike, string stationName) : base(
|
|
bike?.Id ?? throw new ArgumentException(nameof(bike)),
|
|
bike.LockModel,
|
|
bike.IsDemo,
|
|
bike.Group,
|
|
bike.WheelType,
|
|
bike.TypeOfBike,
|
|
bike.Description,
|
|
bike.StationId,
|
|
stationName,
|
|
bike.OperatorUri,
|
|
bike.TariffDescription,
|
|
() => DateTime.Now,
|
|
bike.State)
|
|
{
|
|
LockInfo = new LockInfoMutable(bike.LockInfo.State);
|
|
}
|
|
|
|
public LockInfoMutable LockInfo { get; }
|
|
|
|
ILockInfoMutable IBikeInfoMutable.LockInfo => LockInfo;
|
|
}
|
|
}
|