mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-07-09 12:57:30 +02:00
Version 3.0.376
This commit is contained in:
parent
ca080c87c0
commit
f963c0a219
158 changed files with 3228 additions and 1279 deletions
|
@ -1,4 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TINK.Model.Bikes;
|
||||
|
||||
|
@ -15,20 +15,16 @@ namespace TINK.Model
|
|||
public static BikeCollection GetAtStation(
|
||||
this BikeCollection bikesAtAnyStation,
|
||||
string selectedStation)
|
||||
{
|
||||
return new BikeCollection(bikesAtAnyStation?
|
||||
=> new BikeCollection(bikesAtAnyStation?
|
||||
.Where(bike => !string.IsNullOrEmpty(selectedStation) && bike.StationId == selectedStation)
|
||||
.ToDictionary(bike => bike.Id) ?? new Dictionary<string, BikeInfo>());
|
||||
}
|
||||
|
||||
/// <summary> Filters bikes by bike type. </summary>
|
||||
/// <param name="bcAndLockItBikes">Bikes available, requested and/ or occupied bikes to filter.</param>
|
||||
/// <returns>BikeCollection holding LockIt-bikes empty BikeCollection, if there are no LockIt-bikes.</returns>
|
||||
public static BikeCollection GetLockIt(this BikeCollection bcAndLockItBikes)
|
||||
{
|
||||
return new BikeCollection(bcAndLockItBikes?
|
||||
=> new BikeCollection(bcAndLockItBikes?
|
||||
.Where(bike => bike is Bikes.BikeInfoNS.BluetoothLock.BikeInfo)
|
||||
.ToDictionary(x => x.Id) ?? new Dictionary<string, BikeInfo>());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue