Example #1
0
 public void ProcessManagerServiceEventHandler_ProcessStatusesChanged(object sender, ProcessStatusesEventArgs e)
 {
 }
Example #2
0
        public void ProcessManagerEventProvider_ProcessStatusesChanged(object sender, ProcessStatusesEventArgs e)
        {
            List <ConnectedClient> faultedClients = new List <ConnectedClient>();

            foreach (ConnectedClient client in e.ClientIds.Select(GetClientById))
            {
                try
                {
                    Logger.Add(LogType.Verbose, $"Sending ProcessStatusesChanged event: count = {e.ProcessStatuses.Count}{e.ProcessStatuses.Aggregate("", (x, y) => $"{x}, {y.GroupID} / {y.ApplicationID}")}");
                    client.Caller.ServiceEvent_ProcessStatusesChanged(e.ProcessStatuses.Select(x => new DTOProcessStatus(x)).ToList());
                }
                catch (Exception ex)
                {
                    Logger.Add($"Failed to send ProcessStatusesChanged event: count = {e.ProcessStatuses.Count}{e.ProcessStatuses.Aggregate("", (x, y) => $"{x}, {y.GroupID} / {y.ApplicationID}")}", ex);
                    faultedClients.Add(client);
                }
            }
            RemoveFaultedClients(faultedClients);
        }