Exemple #1
0
        private void SendPayloadToAll(byte[] payload)
        {
            var armlets = _armletList.GetAll();

            foreach (var armletInfo in armlets)
            {
                armletInfo.SetStatus("Отправляется сообщение");
            }
            OnArmletListUpdated();
            _armletService.DeliverToArmlets(armlets.Select(armlet => armlet.Id).ToArray(), payload);
        }
Exemple #2
0
        private void SendPayloadToAll(byte[] payload)
        {
            var armlets = _armletList.GetAll();

            foreach (var armletInfo in armlets)
            {
                armletInfo.SetStatus("Отправляется сообщение");
            }
            OnArmletListUpdated();
            try
            {
                _armletService.DeliverToArmlets(armlets.Select(armlet => armlet.Id).ToArray(), payload);
            }
            catch (GateNotConnectedException exc)
            {
                foreach (var gateId in exc.GateId)
                {
                    _gates[gateId].Value.SetOnline(false);
                }
            }
        }