Пример #1
0
        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);
        }
Пример #2
0
        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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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);
        }