예제 #1
0
파일: Bot.cs 프로젝트: 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();
     }
 }
예제 #2
0
        public override void Dispose()
        {
            Trace.Call();

            base.Dispose();

            _JabberClient.Dispose();
        }
예제 #3
0
 public void Dispose()
 {
     if (jabberClient != null)
     {
         jabberClient.Close();
         jabberClient.Dispose();
     }
 }
예제 #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;
        }