mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-06-22 05:47:28 +02:00
Version 3.0.356
This commit is contained in:
parent
d23aff6daf
commit
5980410182
48 changed files with 242 additions and 362 deletions
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Serilog;
|
||||
|
@ -127,7 +127,7 @@ namespace TINK.Model.Connector
|
|||
await Task.CompletedTask;
|
||||
}
|
||||
|
||||
public async Task DoBook(Bikes.BikeInfoNS.BC.IBikeInfoMutable bike)
|
||||
public async Task DoBookAsync(Bikes.BikeInfoNS.BC.IBikeInfoMutable bike, LockingAction? nextAction = null)
|
||||
{
|
||||
Log.ForContext<Command>().Error("Unexpected booking request detected. No user logged in.");
|
||||
await Task.CompletedTask;
|
||||
|
@ -184,4 +184,4 @@ namespace TINK.Model.Connector
|
|||
public Task CloseLockAsync(Bikes.BikeInfoNS.CopriLock.IBikeInfoMutable bike)
|
||||
=> throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -238,7 +238,8 @@ namespace TINK.Model.Connector
|
|||
|
||||
/// <summary> Request to book a bike. </summary>
|
||||
/// <param name="bike">Bike to book.</param>
|
||||
public async Task DoBook(Bikes.BikeInfoNS.BC.IBikeInfoMutable bike)
|
||||
/// <param name="nextAction">If not null next locking action which is performed after booking.</param>
|
||||
public async Task DoBookAsync(Bikes.BikeInfoNS.BC.IBikeInfoMutable bike, LockingAction? nextAction = null)
|
||||
{
|
||||
if (bike == null)
|
||||
{
|
||||
|
@ -251,10 +252,11 @@ namespace TINK.Model.Connector
|
|||
double batteryPercentage = btBike != null ? btBike.LockInfo.BatteryPercentage : double.NaN;
|
||||
|
||||
response = (await CopriServer.DoBookAsync(
|
||||
bike.OperatorUri,
|
||||
bike.Id,
|
||||
guid,
|
||||
batteryPercentage,
|
||||
bike.OperatorUri)).GetIsBookingResponseOk(bike.Id);
|
||||
nextAction)).GetIsBookingResponseOk(bike.Id);
|
||||
|
||||
bike.Load(
|
||||
response,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using TINK.Model.Device;
|
||||
|
@ -49,7 +49,8 @@ namespace TINK.Model.Connector
|
|||
|
||||
/// <summary> Request to book a bike.</summary>
|
||||
/// <param name="bike">Bike to book.</param>
|
||||
Task DoBook(Bikes.BikeInfoNS.BC.IBikeInfoMutable bike);
|
||||
/// <param name="nextAction">If not null next locking action which is performed after booking.</param>
|
||||
Task DoBookAsync(Bikes.BikeInfoNS.BC.IBikeInfoMutable bike, LockingAction? nextAction = null);
|
||||
|
||||
/// <summary> Request to book a bike and open its lock.</summary>
|
||||
/// <param name="bike">Bike to book and to open lock for.</param>
|
||||
|
@ -163,4 +164,14 @@ namespace TINK.Model.Connector
|
|||
|
||||
public string Mail { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Describes a action to be performed with an lock.
|
||||
/// </summary>
|
||||
public enum LockingAction
|
||||
{
|
||||
Close,
|
||||
Open,
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -662,6 +662,16 @@ namespace TINK.Model
|
|||
AppResources.ChangeLog_PackageUpdates,
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike }
|
||||
},
|
||||
{
|
||||
new Version(3, 0, 355),
|
||||
AppResources.ChangeLog_3_0_355_MK_SB_iOS,
|
||||
new List<AppFlavor> { AppFlavor.MeinKonrad, AppFlavor.ShareeBike },
|
||||
new List<DevicePlatform> { DevicePlatform.iOS }
|
||||
},
|
||||
{
|
||||
new Version(3, 0, 356),
|
||||
AppResources.ChangeLog3_0_231
|
||||
},
|
||||
};
|
||||
|
||||
/// <summary> Manges the whats new information.</summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue