예제 #1
0
        public async Task DisconnectAsync()
        {
            if (!IsConnected)
            {
                return;
            }

            try
            {
                await hubConnection.DisposeAsync();
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
            }

            ActiveChannels.Clear();
            IsConnected = false;
        }
예제 #2
0
 private void IrcClient_OnDisconnected(object sender, EventArgs e)
 {
     ActiveChannels.Clear();
     Console.WriteLine("! Disconnected");
     ErrorLogging.WriteLine("! Disconnected");
 }