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); } }
public void Stop(AgentInstanceStopServices services) { foreach (AgentInstanceMgmtCallback callback in _mgmtCallbackArray) { try { callback.Stop(services); } catch (EPException) { throw; } catch (Exception e) { HandleStopException(e, services.AgentInstanceContext); } } }
public void Stop(AgentInstanceStopServices services) { ProcStop?.Invoke(services); }