예제 #1
0
 public void UpdateFromInfoPacket(UiInfoPacketModel infoList)
 {
     foreach (var aBus in infoList.ActiveBuses)
     {
         UpdateActiveBuses(aBus);
     }
     foreach (var item in infoList.BusesInDb)
     {
         UpdateBusConfig(item);
     }
 }
예제 #2
0
        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;
        }