private void MqttRouteManager_Removed(object sender, HealthCheckEventArgs e)
 {
     if (!e.Health)
     {
         _mqttServiceRouteManager.RemveAddressAsync(new[] { e.Address });
     }
 }
Пример #2
0
        private void ItemNode_Changed(object sender, HealthCheckEventArgs e)
        {
            var list = _unHealths.Where(p => p.Item2.ToString() == e.Address.ToString()).ToList();

            foreach (var item in list)
            {
                if (item.Item1 != null && e.Health)
                {
                    var addressEntry = _concurrent.GetValueOrDefault(item.Item1);
                    addressEntry.Add(item.Item2, item.Item2.ToString());
                    _unHealths.Remove(item);
                }
            }
            if (_unHealths.Count == 0)
            {
                _healthCheckService.Changed -= ItemNode_Changed;
            }
        }
Пример #3
0
 private void ARCLManager_SocketComms_HealthCheck(object sender, HealthCheckEventArgs data) => Dispatcher.BeginInvoke(DispatcherPriority.Render,
                                                                                                                      (Action)(() => { txtEventList.Text += "Health Check\r\n"; }));
Пример #4
0
 private void SpectatorOnHealthChecked(object sender, HealthCheckEventArgs e)
 {
     Console.WriteLine($"Health checked: [{string.Join(", ", e.Results)}]");
 }