mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-23 13:26:29 +02:00
Version 3.0.357
This commit is contained in:
parent
5980410182
commit
5c0b2e70c9
84 changed files with 1012 additions and 449 deletions
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TINK.Model.Bikes.BikeInfoNS.BC;
|
||||
using TINK.Model.Bikes.BikeInfoNS.BikeNS;
|
||||
using TINK.Model.Bikes.BikeInfoNS.DriveNS;
|
||||
using TINK.Model.MiniSurvey;
|
||||
|
@ -13,14 +14,16 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
/// Constructs a bike info object for a available bike or bike for which feed back is pending.
|
||||
/// </summary>
|
||||
/// <param name="bike">Bike object.</param>
|
||||
/// <param name="dataSource">Specified the source of the data.</param>
|
||||
/// <param name="currentStationId">Id of station where bike is located.</param>
|
||||
/// <param name="lockInfo">Lock info.</param>
|
||||
/// <param name="isFeedbackPending">If true user has not yet given feedback after returning bike.</param>
|
||||
/// <param name="operatorUri">Holds the uri of the operator or null, in case of single operator setup.</param>
|
||||
/// <param name="tariffDescription">Hold tariff description of bike.</param>
|
||||
public BikeInfo(
|
||||
BikeNS.Bike bike,
|
||||
Bike bike,
|
||||
Drive drive,
|
||||
DataSource dataSource,
|
||||
string currentStationId,
|
||||
LockInfo lockInfo,
|
||||
bool isFeedbackPending = false,
|
||||
|
@ -40,6 +43,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
bike.Description)
|
||||
: throw new ArgumentNullException(nameof(bike)),
|
||||
drive,
|
||||
dataSource,
|
||||
isDemo,
|
||||
group,
|
||||
currentStationId,
|
||||
|
@ -55,6 +59,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
/// Constructs a bike info object for a requested bike.
|
||||
/// </summary>
|
||||
/// <param name="bike">Bike object.</param>
|
||||
/// <param name="dataSource">Specified the source of the data.</param>
|
||||
/// <param name="requestedAt">Date time when bike was requested</param>
|
||||
/// <param name="mailAddress">Mail address of user which requested bike.</param>
|
||||
/// <param name="currentStationId">Name of station where bike is located, null if bike is on the road.</param>
|
||||
|
@ -63,8 +68,9 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
/// <param name="tariffDescription">Hold tariff description of bike.</param>
|
||||
/// <param name="dateTimeProvider">Provider for current date time to calculate remainig time on demand for state of type reserved.</param>
|
||||
public BikeInfo(
|
||||
BikeNS.Bike bike,
|
||||
Bike bike,
|
||||
Drive drive,
|
||||
DataSource dataSource,
|
||||
DateTime requestedAt,
|
||||
string mailAddress,
|
||||
string currentStationId,
|
||||
|
@ -80,7 +86,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
mailAddress,
|
||||
""),
|
||||
bike != null
|
||||
? new BikeNS.Bike(
|
||||
? new Bike(
|
||||
bike.Id,
|
||||
LockModel.Sigo /* Ensure consistend lock model value */,
|
||||
bike.WheelType,
|
||||
|
@ -88,6 +94,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
bike.Description)
|
||||
: throw new ArgumentNullException(nameof(bike)),
|
||||
drive,
|
||||
dataSource,
|
||||
isDemo,
|
||||
group,
|
||||
currentStationId,
|
||||
|
@ -103,6 +110,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
/// Constructs a bike info object for a booked bike.
|
||||
/// </summary>
|
||||
/// <param name="bike">Bike object.</param>
|
||||
/// <param name="dataSource">Specified the source of the data.</param>
|
||||
/// <param name="bookedAt">Date time when bike was booked</param>
|
||||
/// <param name="mailAddress">Mail address of user which booked bike.</param>
|
||||
/// <param name="currentStationId">Name of station where bike is located, null if bike is on the road.</param>
|
||||
|
@ -110,8 +118,9 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
/// <param name="operatorUri">Holds the uri of the operator or null, in case of single operator setup.</param>
|
||||
/// <param name="tariffDescription">Hold tariff description of bike.</param>
|
||||
public BikeInfo(
|
||||
BikeNS.Bike bike,
|
||||
Bike bike,
|
||||
Drive drive,
|
||||
DataSource dataSource,
|
||||
DateTime bookedAt,
|
||||
string mailAddress,
|
||||
string currentStationId,
|
||||
|
@ -125,7 +134,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
mailAddress,
|
||||
""),
|
||||
bike != null
|
||||
? new BikeNS.Bike(
|
||||
? new Bike(
|
||||
bike.Id,
|
||||
LockModel.Sigo /* Ensure consistend lock model value */,
|
||||
bike.WheelType,
|
||||
|
@ -133,6 +142,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
bike.Description)
|
||||
: throw new ArgumentNullException(nameof(bike)),
|
||||
drive,
|
||||
dataSource,
|
||||
isDemo,
|
||||
group,
|
||||
currentStationId,
|
||||
|
@ -143,7 +153,6 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
MiniSurvey = new MiniSurveyModel();
|
||||
Co2Saving = string.Empty;
|
||||
}
|
||||
|
||||
public BikeInfo(BC.BikeInfo bikeInfo, LockInfo lockInfo) : base(
|
||||
bikeInfo ?? throw new ArgumentException($"Can not copy-construct {typeof(BikeInfo).Name}-object. Source bike info must not be null."))
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
|
||||
namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.CopriLock
|
|||
? bike.Bike
|
||||
: throw new ArgumentNullException(nameof(bike)),
|
||||
bike.Drive,
|
||||
bike.DataSource,
|
||||
bike.IsDemo,
|
||||
bike.Group,
|
||||
bike.StationId,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue