Ejemplo n.º 1
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();
    }
Ejemplo n.º 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());
        }