private void X_RunProfileExecutionComplete(object sender, RunProfileExecutionCompleteEventArgs e) { EventService.NotifySubscribersOnRunProfileExecutionComplete(((MAController)sender).ManagementAgentID, e); }
internal static void NotifySubscribersOnRunProfileExecutionComplete(Guid managementAgentID, RunProfileExecutionCompleteEventArgs e) { if (EventService.subscribers.ContainsKey(managementAgentID)) { foreach (IEventCallBack i in EventService.subscribers[managementAgentID].ToArray()) { try { i.RunProfileExecutionComplete(e); } catch (Exception ex) { logger.Warn(ex, "Error notifying client. Client will be deregistered"); EventService.DeregisterCallbackChannel(i); } } } }