示例#1
0
        public static void StopSafe(
            AgentInstanceMgmtCallback stopMethod,
            AgentInstanceContext agentInstanceContext)
        {
            var stopServices = new AgentInstanceStopServices(agentInstanceContext);

            var additionalTerminations = agentInstanceContext.TerminationCallbackRO;
            foreach (var stop in additionalTerminations) {
                try {
                    stop.Stop(stopServices);
                }
                catch (EPException) {
                    throw;
                }
                catch (Exception e) {
                    HandleStopException(e, agentInstanceContext);
                }
            }

            try {
                stopMethod.Stop(stopServices);
            }
            catch (EPException) {
                throw;
            }
            catch (Exception e) {
                HandleStopException(e, agentInstanceContext);
            }
        }
示例#2
0
 public void Stop(AgentInstanceStopServices services)
 {
     foreach (AgentInstanceMgmtCallback callback in _mgmtCallbackArray) {
         try {
             callback.Stop(services);
         }
         catch (EPException) {
             throw;
         }
         catch (Exception e) {
             HandleStopException(e, services.AgentInstanceContext);
         }
     }
 }
示例#3
0
 public void Stop(AgentInstanceStopServices services)
 {
     ProcStop?.Invoke(services);
 }