using Microsoft.AspNet.SignalR;
using Microsoft.AspNet.SignalR.Hubs;
using SignalRChart.Models;
using System.Collections;
using System.Collections.Generic;

namespace SignalRChart.Hubs
{
    [HubName("statusMonitorHub")]
    public class StatusMonitorHub : Hub
    {
        public IEnumerable<ChartValueModel> GetChartValues()
        {
            var testdata = new double[] { 3.907, 7.943, 7.848, 9.284, 9.263, 9.801, 3.890, 8.238, 9.552, 6.855 };
            int i = 1;
            ICollection<ChartValueModel> model = new List<ChartValueModel>();
            foreach (var value in testdata)
            {
                model.Add(new ChartValueModel() { Value = value, Index = (i++).ToString() });
            }
            return model;
        }
    }
}