public void Handle(TemperatureDeviceRemoved message)
 {
     if (Program.TempSensorDeviceIds.ContainsKey(message.DeviceId))
     {
         Console.WriteLine("Removing temperature device with id {0}", message.DeviceId);
         Program.TempSensorDeviceIds.TryRemove(message.DeviceId, out _);
     }
 }
Пример #2
0
 public void Handle(TemperatureDeviceRemoved message)
 {
     _context.Clients.All.removeTemperatureDevice(ShortDeviceId(message.DeviceId));
     Console.WriteLine("TemperatureDeviceRemoved for device id {0}", message.DeviceId);
 }