Version 3.0.364

This commit is contained in:
Anja 2023-05-09 08:47:52 +02:00
parent 91d42552c7
commit 0b9196a78d
91 changed files with 3452 additions and 555 deletions

View file

@ -30,7 +30,7 @@ namespace TINK.Model.Connector.Updater
/// <summary>
/// Gets all station for station provider and add them into station list.
/// </summary>
/// <param name="p_oStationList">List of stations to update.</param>
/// <param name="stationsAllResponse">List of stations to update.</param>
public static StationDictionary GetStationsAllMutable(this StationsAvailableResponse stationsAllResponse)
{
// Get stations from Copri/ file/ memory, ....
@ -43,7 +43,7 @@ namespace TINK.Model.Connector.Updater
Version.TryParse(stationsAllResponse.copri_version, out Version copriVersion);
var stations = new StationDictionary(p_oVersion: copriVersion);
var stations = new StationDictionary(version: copriVersion);
foreach (var station in stationsAllResponse.stations)
{
@ -54,18 +54,7 @@ namespace TINK.Model.Connector.Updater
string.Format("Station id {0} is not unique.", station.Value.station), stationsAllResponse);
}
stations.Add(new Stations.StationNS.Station(
station.Value.station,
station.Value.GetGroup(),
station.Value.GetPosition(),
station.Value.description,
new Data(station.Value.operator_data?.operator_name,
station.Value.operator_data?.operator_phone,
station.Value.operator_data?.operator_hours,
station.Value.operator_data?.operator_email,
!string.IsNullOrEmpty(station.Value.operator_data?.operator_color)
? Color.FromHex(station.Value.operator_data?.operator_color)
: (Color?)null)));
stations.Add(station.Value.GetStation());
}
return stations;