public void UpdateFromInfoPacket(UiInfoPacketModel infoList) { foreach (var aBus in infoList.ActiveBuses) { UpdateActiveBuses(aBus); } foreach (var item in infoList.BusesInDb) { UpdateBusConfig(item); } }
private async Task SendResponseForControl(List <BusConfigurationDB> confs) { var groupList = new List <string> { SignalRGroups.Control }; var infoPkt = new UiInfoPacketModel { BusesInDb = confs, ActiveBuses = ActiveService.ActiveBuses }; await SetGroups(groupList); infoPkt.IncSerial(); await Clients.Caller.SendAsync(SignalRCommands.InfoPacket, infoPkt); return; }