Version 3.0.376

This commit is contained in:
Anja 2023-11-21 15:26:57 +01:00
parent ca080c87c0
commit f963c0a219
158 changed files with 3228 additions and 1279 deletions

View file

@ -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>());
}
}
}