mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-22 21:06:30 +02:00
Version 3.0.294
This commit is contained in:
parent
d92fb4a40f
commit
8f40f2c208
133 changed files with 17890 additions and 14246 deletions
|
@ -22,6 +22,7 @@ namespace TINK.Model.Bike.BC
|
|||
protected BikeInfo(
|
||||
IStateInfo stateInfo,
|
||||
string id,
|
||||
LockModel lockModel,
|
||||
bool? isDemo = DEFAULTVALUEISDEMO,
|
||||
IEnumerable<string> group = null,
|
||||
WheelType? wheelType = null,
|
||||
|
@ -31,7 +32,7 @@ namespace TINK.Model.Bike.BC
|
|||
Uri operatorUri = null,
|
||||
TariffDescription tariffDescription = null)
|
||||
{
|
||||
Bike = new Bike(id, wheelType, typeOfBike, description);
|
||||
Bike = new Bike(id, lockModel, wheelType, typeOfBike, description);
|
||||
|
||||
m_oStateInfo = stateInfo;
|
||||
|
||||
|
@ -45,6 +46,7 @@ namespace TINK.Model.Bike.BC
|
|||
public BikeInfo(BikeInfo bikeInfo) : this(
|
||||
bikeInfo?.State,
|
||||
bikeInfo?.Id ?? throw new ArgumentException($"Can not copy-construct {typeof(BikeInfo).Name}-object. Source must not be null."),
|
||||
bikeInfo.LockModel,
|
||||
bikeInfo.IsDemo,
|
||||
bikeInfo.Group,
|
||||
bikeInfo.WheelType,
|
||||
|
@ -64,6 +66,7 @@ namespace TINK.Model.Bike.BC
|
|||
/// <param name="wheelType"></param>
|
||||
public BikeInfo(
|
||||
string id,
|
||||
LockModel lockModel,
|
||||
string stationId,
|
||||
Uri operatorUri = null,
|
||||
TariffDescription tariffDescription = null,
|
||||
|
@ -73,7 +76,8 @@ namespace TINK.Model.Bike.BC
|
|||
TypeOfBike? typeOfBike = null,
|
||||
string description = null) : this(
|
||||
new StateInfo(),
|
||||
id,
|
||||
id,
|
||||
lockModel,
|
||||
isDemo,
|
||||
group,
|
||||
wheelType,
|
||||
|
@ -88,7 +92,6 @@ namespace TINK.Model.Bike.BC
|
|||
/// <summary>
|
||||
/// Constructs a bike info object for a requested bike.
|
||||
/// </summary>
|
||||
/// <param name="dateTimeProvider">Provider for current date time to calculate remainig time on demand for state of type reserved.</param>
|
||||
/// <param name="wheelType"></param>
|
||||
/// <param name="id">Unique id of bike.</param>
|
||||
/// <param name="stationId">Name of station where bike is located, null if bike is on the road.</param>
|
||||
|
@ -97,9 +100,10 @@ namespace TINK.Model.Bike.BC
|
|||
/// <param name="requestedAt">Date time when bike was requested</param>
|
||||
/// <param name="mailAddress">Mail address of user which requested bike.</param>
|
||||
/// <param name="code">Booking code.</param>
|
||||
/// <param name="p_oDateTimeNowProvider">Date time provider to calculate reaining time.</param>
|
||||
/// <param name="dateTimeProvider">Date time provider to calculate reaining time.</param>
|
||||
public BikeInfo(
|
||||
string id,
|
||||
LockModel lockModel,
|
||||
bool? isDemo,
|
||||
IEnumerable<string> group,
|
||||
WheelType? wheelType,
|
||||
|
@ -117,7 +121,8 @@ namespace TINK.Model.Bike.BC
|
|||
requestedAt,
|
||||
mailAddress,
|
||||
code),
|
||||
id,
|
||||
id,
|
||||
lockModel,
|
||||
isDemo,
|
||||
group,
|
||||
wheelType,
|
||||
|
@ -134,6 +139,7 @@ namespace TINK.Model.Bike.BC
|
|||
/// </summary>
|
||||
/// <param name="dateTimeProvider">Provider for current date time to calculate remainig time on demand for state of type reserved.</param>
|
||||
/// <param name="wheelType"></param>
|
||||
/// <param name="lockModel">Specifies the lock model.</param>
|
||||
/// <param name="id">Unique id of bike.</param>
|
||||
/// <param name="currentStationId">Name of station where bike is located, null if bike is on the road.</param>
|
||||
/// <param name="operatorUri">Holds the uri of the operator or null, in case of single operator setup.</param>
|
||||
|
@ -143,6 +149,7 @@ namespace TINK.Model.Bike.BC
|
|||
/// <param name="code">Booking code.</param>
|
||||
public BikeInfo(
|
||||
string id,
|
||||
LockModel lockModel,
|
||||
bool? isDemo,
|
||||
IEnumerable<string> group,
|
||||
WheelType? wheelType,
|
||||
|
@ -158,7 +165,8 @@ namespace TINK.Model.Bike.BC
|
|||
bookedAt,
|
||||
mailAddress,
|
||||
code),
|
||||
id,
|
||||
id,
|
||||
lockModel,
|
||||
isDemo,
|
||||
group,
|
||||
wheelType,
|
||||
|
@ -198,6 +206,9 @@ namespace TINK.Model.Bike.BC
|
|||
|
||||
public TypeOfBike? TypeOfBike => Bike.TypeOfBike;
|
||||
|
||||
/// <summary> Gets the model of the lock. </summary>
|
||||
public LockModel LockModel => Bike.LockModel;
|
||||
|
||||
public string Description => Bike.Description;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace TINK.Model.Bike.BC
|
|||
/// <param name="stateInfo">Bike state info.</param>
|
||||
protected BikeInfoMutable(
|
||||
string id,
|
||||
LockModel lockModel,
|
||||
bool isDemo = BikeInfo.DEFAULTVALUEISDEMO,
|
||||
IEnumerable<string> group = null,
|
||||
WheelType? wheelType = null,
|
||||
|
@ -44,7 +45,7 @@ namespace TINK.Model.Bike.BC
|
|||
{
|
||||
IsDemo = isDemo;
|
||||
Group = group;
|
||||
m_oBike = new Bike(id, wheelType, typeOfBike, description);
|
||||
m_oBike = new Bike(id, lockModel, wheelType, typeOfBike, description);
|
||||
m_oStateInfo = new StateInfoMutable(dateTimeProvider, stateInfo);
|
||||
m_oStateInfo.PropertyChanged += (sender, eventargs) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(eventargs.PropertyName));
|
||||
StationId = stationId;
|
||||
|
@ -56,6 +57,7 @@ namespace TINK.Model.Bike.BC
|
|||
/// <summary> Constructs a bike object from source. </summary>
|
||||
public BikeInfoMutable(IBikeInfo bike, string stationName) : this(
|
||||
bike.Id,
|
||||
bike.LockModel,
|
||||
bike.IsDemo,
|
||||
bike.Group,
|
||||
bike.WheelType,
|
||||
|
@ -110,6 +112,8 @@ namespace TINK.Model.Bike.BC
|
|||
|
||||
public TypeOfBike? TypeOfBike => m_oBike.TypeOfBike;
|
||||
|
||||
public LockModel LockModel => m_oBike.LockModel;
|
||||
|
||||
public string Description => m_oBike.Description;
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -31,6 +31,9 @@ namespace TINK.Model.Bike.BC
|
|||
/// </summary>
|
||||
TypeOfBike? TypeOfBike { get; }
|
||||
|
||||
/// <summary> Gets the model of the lock. </summary>
|
||||
LockModel LockModel { get; }
|
||||
|
||||
/// <summary> Holds the description of the bike. </summary>
|
||||
string Description { get; }
|
||||
|
||||
|
|
|
@ -29,6 +29,9 @@ namespace TINK.Model.Bikes.Bike.BC
|
|||
/// </summary>
|
||||
TypeOfBike? TypeOfBike { get; }
|
||||
|
||||
/// <summary> Gets the model of the lock. </summary>
|
||||
LockModel LockModel { get; }
|
||||
|
||||
/// <summary> Holds the description of the bike. </summary>
|
||||
string Description { get; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue