Пример #1
0
        public void ReceiveAlert(TornadoAlertMessage alert)
        {
            var          hubContext   = GlobalHost.ConnectionManager.GetHubContext <TornadoAlertsHub>();
            TornadoAlert tornadoAlert = new TornadoAlert()
            {
                Name = alert.Name, Location = alert.Location
            };

            hubContext.Clients.All.addTornadoAlertMessage(tornadoAlert);
        }
Пример #2
0
 public void SendTornadoAlert(TornadoAlert alert)
 {
     Clients.All.addTornadoAlertMessage(alert);
 }