mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 13:57:28 +02:00
Version 3.0.363
This commit is contained in:
parent
4ff3307997
commit
91d42552c7
212 changed files with 1799 additions and 1318 deletions
|
@ -6,7 +6,7 @@ using TINK.Model.State;
|
|||
|
||||
namespace TINK.Model.Bikes.BikeInfoNS.BC
|
||||
{
|
||||
public class BikeInfo : IBikeInfo
|
||||
public abstract class BikeInfo : IBikeInfo
|
||||
{
|
||||
/// <summary> Default value of demo property. </summary>
|
||||
public const bool DEFAULTVALUEISDEMO = false;
|
||||
|
@ -64,72 +64,6 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
bikeInfo.TariffDescription)
|
||||
{ }
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a bike info object for a available bike.
|
||||
/// </summary>
|
||||
/// <param name="dataSource">Specified the source of the data.</param>
|
||||
/// <param name="stationId">Id of station where bike is located.</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(
|
||||
Bike bike,
|
||||
Drive drive,
|
||||
DataSource dataSource,
|
||||
string stationId,
|
||||
Uri operatorUri = null,
|
||||
RentalDescription tariffDescription = null,
|
||||
bool? isDemo = DEFAULTVALUEISDEMO,
|
||||
IEnumerable<string> group = null) : this(
|
||||
new StateInfo(),
|
||||
bike,
|
||||
drive,
|
||||
dataSource,
|
||||
isDemo,
|
||||
group,
|
||||
stationId,
|
||||
operatorUri,
|
||||
tariffDescription)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a bike info object for a booked bike.
|
||||
/// </summary>
|
||||
/// <param name="dataSource">Specified the source of the data.</param>
|
||||
/// <param name="dateTimeProvider">Provider for current date time to calculate remainig time on demand for state of type reserved.</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>
|
||||
/// <param name="tariffDescription">Hold tariff description of bike.</param>
|
||||
/// <param name="bookedAt">Date time when bike was booked</param>
|
||||
/// <param name="mailAddress">Mail address of user which booked bike.</param>
|
||||
/// <param name="code">Booking code.</param>
|
||||
public BikeInfo(
|
||||
Bike bike,
|
||||
Drive drive,
|
||||
DataSource dataSource,
|
||||
bool? isDemo,
|
||||
IEnumerable<string> group,
|
||||
string currentStationId,
|
||||
Uri operatorUri,
|
||||
RentalDescription tariffDescription,
|
||||
DateTime bookedAt,
|
||||
string mailAddress,
|
||||
string code) : this(
|
||||
new StateInfo(
|
||||
bookedAt,
|
||||
mailAddress,
|
||||
code),
|
||||
bike,
|
||||
drive,
|
||||
dataSource,
|
||||
isDemo,
|
||||
group,
|
||||
currentStationId,
|
||||
operatorUri,
|
||||
tariffDescription)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary> True if device is demo device, false otherwise. </summary>
|
||||
public bool IsDemo { get; }
|
||||
|
||||
|
@ -141,7 +75,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
/// </summary>
|
||||
public string StationId { get; }
|
||||
|
||||
/// <summary> Holds description about the tarif. </summary>
|
||||
/// <summary> Holds description about the tariff. </summary>
|
||||
public RentalDescription TariffDescription { get; }
|
||||
|
||||
/// Holds the rent state of the bike.
|
||||
|
|
|
@ -9,7 +9,7 @@ using TINK.Model.State;
|
|||
namespace TINK.Model.Bikes.BikeInfoNS.BC
|
||||
{
|
||||
[DataContract]
|
||||
public class BikeInfoMutable : IBikeInfoMutable, INotifyPropertyChanged
|
||||
public abstract class BikeInfoMutable : IBikeInfoMutable, INotifyPropertyChanged
|
||||
{
|
||||
/// <summary> Holds the bike. </summary>
|
||||
private readonly Bike _Bike;
|
||||
|
@ -24,7 +24,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
/// Constructs a bike.
|
||||
/// </summary>
|
||||
/// <param name="isDemo">True if device is demo device, false otherwise.</param>
|
||||
/// <param name="dateTimeProvider">Provider for current date time to calculate remainig time on demand for state of type reserved.</param>
|
||||
/// <param name="dateTimeProvider">Provider for current date time to calculate remaining time on demand for state of type reserved.</param>
|
||||
/// <param name="stationId">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>
|
||||
/// <param name="tariffDescription">Hold tariff description of bike.</param>
|
||||
|
@ -55,24 +55,6 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
TariffDescription = tariffDescription;
|
||||
}
|
||||
|
||||
/// <summary> Constructs a bike object from source. </summary>
|
||||
public BikeInfoMutable(IBikeInfo bike, string stationName) : this(
|
||||
bike != null
|
||||
? bike.Bike
|
||||
: throw new ArgumentNullException(nameof(bike)),
|
||||
bike.Drive,
|
||||
bike.DataSource,
|
||||
bike.IsDemo,
|
||||
bike.Group,
|
||||
bike.StationId,
|
||||
stationName,
|
||||
bike.OperatorUri,
|
||||
bike.TariffDescription,
|
||||
null /* date time provider */,
|
||||
bike.State)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary> Id of station a which bike is located, null otherwise.</summary>
|
||||
[DataMember]
|
||||
public string StationId { get; }
|
||||
|
@ -81,7 +63,7 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
[DataMember]
|
||||
public string StationName { get; }
|
||||
|
||||
/// <summary> Holds description about the tarif. </summary>
|
||||
/// <summary> Holds description about the tariff. </summary>
|
||||
[DataMember]
|
||||
public RentalDescription TariffDescription { get; private set; }
|
||||
|
||||
|
@ -113,6 +95,12 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
|
||||
public TypeOfBike? TypeOfBike => _Bike.TypeOfBike;
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether bike is a AA bike (bike must be always returned a the same station) or AB bike (start and end stations can be different stations).
|
||||
/// </summary>
|
||||
public AaRideType? AaRideType => _Bike.AaRideType;
|
||||
|
||||
|
||||
public LockModel LockModel => _Bike.LockModel;
|
||||
|
||||
public string Description => _Bike.Description;
|
||||
|
|
|
@ -30,6 +30,11 @@ namespace TINK.Model.Bikes.BikeInfoNS.BC
|
|||
/// </summary>
|
||||
TypeOfBike? TypeOfBike { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets whether bike is a AA bike (bike must be always returned a the same station) or AB bike (start and end stations can be different stations).
|
||||
/// </summary>
|
||||
AaRideType? AaRideType { get; }
|
||||
|
||||
/// <summary> Gets the model of the lock. </summary>
|
||||
LockModel LockModel { get; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue