From fa874041371f8cf3dac3918a7d8d726d42f4d1a9 Mon Sep 17 00:00:00 2001 From: Chris Kaczor Date: Sat, 17 Jan 2015 09:13:27 -0500 Subject: [PATCH] Change dictionary to list of key/value pair for better JSON --- SignalR/WeatherHub.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/SignalR/WeatherHub.cs b/SignalR/WeatherHub.cs index aa265eb..ef6cf9d 100644 --- a/SignalR/WeatherHub.cs +++ b/SignalR/WeatherHub.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNet.SignalR; +using System.Linq; +using Microsoft.AspNet.SignalR; using System.Collections.Generic; using WeatherService.Devices; using WeatherService.Remote; @@ -23,19 +24,19 @@ namespace WeatherService.SignalR return WeatherServiceCommon.GetDeviceHistory(deviceAddress); } - public Dictionary> GetDeviceHistoryByValueType(WeatherValueType valueType) + public List>> GetDeviceHistoryByValueType(WeatherValueType valueType) { - return WeatherServiceCommon.GetDeviceHistoryByValueType(valueType); + return WeatherServiceCommon.GetDeviceHistoryByValueType(valueType).ToList(); } - public Dictionary> GetWindSpeedHistory(int groupIntervalMinutes) + public List>> GetWindSpeedHistory(int groupIntervalMinutes) { - return WeatherServiceCommon.GetWindSpeedHistory(groupIntervalMinutes); + return WeatherServiceCommon.GetWindSpeedHistory(groupIntervalMinutes).ToList(); } - public Dictionary GetWindDirectionHistory() + public List> GetWindDirectionHistory() { - return WeatherServiceCommon.GetWindDirectionHistory(); + return WeatherServiceCommon.GetWindDirectionHistory().ToList(); } } }