示例#1
0
 private void X_RunProfileExecutionComplete(object sender, RunProfileExecutionCompleteEventArgs e)
 {
     EventService.NotifySubscribersOnRunProfileExecutionComplete(((MAController)sender).ManagementAgentID, e);
 }
示例#2
0
 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);
             }
         }
     }
 }