Exemple #1
0
        public void Dispose()
        {
            if (Name == null)
            {
                return;
            }

            Name.Dispose();
            Name = null;
            Modes.Dispose();
            Modes = null;
            Topic.Dispose();
            Topic = null;
            TopicSetBy.Dispose();
            TopicSetBy = null;
            TopicSetDate.Dispose();
            TopicSetDate = null;
            CreatedDate.Dispose();
            CreatedDate = null;
            _knownUsers.Do(u => u.Dispose());
            _knownUsers.Clear();
            _knownUsers.Dispose();
            _knownUsers = null;
            _users.Clear();
            _users.Dispose();
            _users = null;
        }
        new public void Dispose()
        {
            if (_disposables == null)
            {
                return;
            }

            _disposables.Dispose();
            _disposables = null;

            _sentMessages.OnCompleted();
            _sentMessages.Dispose();
            _sentMessages = null;
            _internalReceivedMessages.OnCompleted();
            _internalReceivedMessages.Dispose();
            _internalReceivedMessages = null;
            _messages.OnCompleted();
            _messages.Dispose();
            _messages = null;

            _users.Do(u => u.Dispose());
            _users.Clear();
            _users = null;
            _channels.Do(c => c.Dispose());
            _channels.Clear();
            _channels = null;
            _networks.Do(n => n.Dispose());
            _networks.Clear();
            _networks = null;

            base.Dispose();
        }