private void FinalizePsdkApplicationBlocks() { if (confServiceContract != null) { ConfServiceFactory.ReleaseConfService(confServiceContract); } // Cleanup code eventBrokerService.Deactivate(); eventBrokerService.Dispose(); // Close Connection if opened (check status of protocol object) IProtocol protocol = protocolManagementService[configServerId]; if (protocol.State == ChannelState.Opened) // Close only if the protocol state is opened { try { protocol.Close(); } catch (Exception ex) { Console.Write(ex.Message + "\n" + ex.StackTrace + "\n"); } } protocolManagementService.Unregister(configServerId); }
private static void FinalizePSDKApplicationBlocks() { ConfServiceFactory.ReleaseConfService(confService); // Cleanup code eventBrokerService.Deactivate(); eventBrokerService.Dispose(); // Close Connection if opened (check status of protocol object) IProtocol protocol = protocolManagementService[CONFIGSERVER_IDENTIFIER]; if (protocol.State == ChannelState.Opened) // Close only if the protocol state is opened { try { protocol.Close(); } catch (Exception ex) { log.Error(ex.Message, ex); } } protocolManagementService.Unregister(CONFIGSERVER_IDENTIFIER); }
public void FinalizePSDKApplicationBlocks() { // Cleanup code _mEventBroker.Deactivate(); _mEventBroker.Dispose(); try { _messageServerProtocol.Close(); } catch (Exception ex) { Console.Write(ex.Message + "\n" + ex.StackTrace + "\n"); } _messageServerProtocol.Dispose(); _messageServerProtocol = null; }
public void FinalizePSDKApplicationBlocks() { // Cleanup code eventBrokerService.Deactivate(); eventBrokerService.Dispose(); // Close Connection if opened (check status of protocol object) IProtocol protocol = protocolManagementService[ISERVER_IDENTIFIER]; if (protocol.State == ChannelState.Opened) // Close only if the protocol state is opened { try { protocol.Close(); } catch (Exception ex) { LogException(ex); } } protocolManagementService.Unregister(ISERVER_IDENTIFIER); }
private void FinalizePSDKApplicationBlocks() { // Cleanup code eventBrokerService.Deactivate(); eventBrokerService.Dispose(); // Close Connection if opened (check status of protocol object) IProtocol protocol = protocolManagementService[OCS_IDENTIFIER]; if (protocol.State == ChannelState.Opened) // Close only if the protocol state is opened { try { protocol.Close(); } catch (Exception ex) { Console.Write(ex.Message + "\n" + ex.StackTrace + "\n"); } } protocolManagementService.Unregister(OCS_IDENTIFIER); }