示例#1
0
 public override void BeforeCloseChannel()
 {
     if (Settings.ClientType != ClientType.SendAndReceiver_WithoutChat)
     {
         Channels.CloseChannel(ref _chatMessagesChannel);
         Channels.CloseFactory(ref ChatMessagesChannelFactory);
     }
     base.BeforeCloseChannel();
 }
示例#2
0
        public void CloseFactories()
        {
            if (ClientStatus == ClientStatus.Connected)
            {
                new DisconnectCommand <MT, T>(true).ExecuteSafe(this, null);
            }
            else
            {
                ClientStatus = ClientStatus.NotConnected;
            }

            BeforeCloseChannel();

            Channels.CloseChannel(ref _mainChannel);
            Channels.CloseFactory(ref MainChannelFactory);

            if (BroadcastChannels != null)
            {
                BroadcastChannels.Dispose();
                BroadcastChannels = null;
            }
        }