private void CloseChannels()
 {
     if (this.netOnewayChannel != null && this.netOnewayChannelFactory != null)
     {
         ServiceBusHelper.CloseoneWayChannelFactoryAndChannel(this.netOnewayChannelFactory, this.netOnewayChannel);
     }
 }
示例#2
0
        private void CloseChannels()
        {
            if (this.netOnewayChannel != null && this.netOnewayChannelFactory != null)
            {
                ServiceBusHelper.CloseoneWayChannelFactoryAndChannel(this.netOnewayChannelFactory, this.netOnewayChannel);
            }

            if (netEventRelayChannel != null && netEventRelayChannelFactory != null)
            {
                try
                {
                    netEventRelayChannel.GoingOffline(tsGatewayId.Text, serviceUri, DateTime.UtcNow);
                }
                catch (Exception) { }
                netEventRelayChannel.Close();

                netEventRelayChannelFactory.Close();
            }
            if (server != null)
            {
                server.Close();
            }
        }