private void CloseChannels() { if (this.netOnewayChannel != null && this.netOnewayChannelFactory != null) { ServiceBusHelper.CloseoneWayChannelFactoryAndChannel(this.netOnewayChannelFactory, this.netOnewayChannel); } }
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(); } }