Ejemplo n.º 1
0
        private void resolver_AlertsSourceRemoved(object sender, AlertsSourceEventArgs e)
        {
            if (InvokeRequired)
            {
                InvokeAsync(() => resolver_AlertsSourceRemoved(sender, e));
                return;
            }

            _alertsSourcesPoller.Remove(_sources[e.Source]);
            _sources.Remove(e.Source);
        }
Ejemplo n.º 2
0
        private void resolver_AlertsSourceCreated(object sender, AlertsSourceEventArgs e)
        {
            if (InvokeRequired)
            {
                InvokeAsync(() => resolver_AlertsSourceCreated(sender, e));
                return;
            }

            AlertsSourceConfig config = _resolvers[sender as DnsAlertsSourceResolver];

            AlertsSourcePoller poller = new AlertsSourcePoller(e.Source, config.RegularPollingFrequency, config.FastPollingFrequency);

            _sources.Add(e.Source, poller);
            _alertsSourcesPoller.Add(poller);
        }