Beispiel #1
0
Datei: Bot.cs Projekt: mbsky/bugx
 /// <summary>
 /// Disposes of the resources (other than memory) used by the module that implements <see cref="T:System.Web.IHttpModule"></see>.
 /// </summary>
 /// <param name="disposing">if set to <c>true</c> dispose; Otherwise destroying.</param>
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         _Bot.Dispose();
     }
 }
Beispiel #2
0
        public override void Dispose()
        {
            Trace.Call();

            base.Dispose();

            _JabberClient.Dispose();
        }
 public void Dispose()
 {
     if (jabberClient != null)
     {
         jabberClient.Close();
         jabberClient.Dispose();
     }
 }
Beispiel #4
0
        public void Disconnect()
        {
            // удаляем чаты
            foreach (var chat in _chatRooms)
            {
                chat.StateChanged -= ichat_StateChanged;
                chat.Dispose();
            }
            _chatRooms.Clear();
            // удаляем комнаты
            foreach (Room r in _rooms.Values)
            {
                r.Leave(null);
            }
            _rooms.Clear();

            _connected = false;
            if (_disco != null)
            {
                _disco.Dispose();
            }
            if (_conference != null)
            {
                _conference.Dispose();
            }
            if (_roster != null)
            {
                _roster.Dispose();
            }
            if (_jc == null)
            {
                return;
            }

            _jc.Close();
            UnSubscribe();
            _jc.Dispose();
            _jc = null;
        }