mirror of
https://github.com/ckaczor/WeatherService.git
synced 2026-01-14 01:25:43 -05:00
Change dictionary to list of key/value pair for better JSON
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Microsoft.AspNet.SignalR;
|
using System.Linq;
|
||||||
|
using Microsoft.AspNet.SignalR;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using WeatherService.Devices;
|
using WeatherService.Devices;
|
||||||
using WeatherService.Remote;
|
using WeatherService.Remote;
|
||||||
@@ -23,19 +24,19 @@ namespace WeatherService.SignalR
|
|||||||
return WeatherServiceCommon.GetDeviceHistory(deviceAddress);
|
return WeatherServiceCommon.GetDeviceHistory(deviceAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<DeviceBase, List<ReadingBase>> GetDeviceHistoryByValueType(WeatherValueType valueType)
|
public List<KeyValuePair<DeviceBase, List<ReadingBase>>> GetDeviceHistoryByValueType(WeatherValueType valueType)
|
||||||
{
|
{
|
||||||
return WeatherServiceCommon.GetDeviceHistoryByValueType(valueType);
|
return WeatherServiceCommon.GetDeviceHistoryByValueType(valueType).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, List<WindSpeedReading>> GetWindSpeedHistory(int groupIntervalMinutes)
|
public List<KeyValuePair<string, List<WindSpeedReading>>> GetWindSpeedHistory(int groupIntervalMinutes)
|
||||||
{
|
{
|
||||||
return WeatherServiceCommon.GetWindSpeedHistory(groupIntervalMinutes);
|
return WeatherServiceCommon.GetWindSpeedHistory(groupIntervalMinutes).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Dictionary<string, int> GetWindDirectionHistory()
|
public List<KeyValuePair<string, int>> GetWindDirectionHistory()
|
||||||
{
|
{
|
||||||
return WeatherServiceCommon.GetWindDirectionHistory();
|
return WeatherServiceCommon.GetWindDirectionHistory().ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user