public IHttpActionResult Post(NoiseEvent noiseEvent)
    {
      noiseEvent.DateTime = noiseEvent.DateTime.ToUniversalTime();
      noiseEvent.Level = Math.Round(noiseEvent.Level, 3);

      Debug.Write(noiseEvent.DateTime);
      var context = GlobalHost.ConnectionManager.GetHubContext<NoiseDataHub>();

      context.Clients.All.newMessage(noiseEvent);

      return Ok();
    }
Exemple #2
0
        public IHttpActionResult Post(NoiseEvent noiseEvent)
        {
            noiseEvent.DateTime = noiseEvent.DateTime.ToUniversalTime();
            noiseEvent.Level    = Math.Round(noiseEvent.Level, 3);

            Debug.Write(noiseEvent.DateTime);
            var context = GlobalHost.ConnectionManager.GetHubContext <NoiseDataHub>();

            context.Clients.All.newMessage(noiseEvent);

            return(Ok());
        }