コード例 #1
0
 private ChannelUser AddUserToChannel(User user, Channel channel)
 {
     user.AddChannel(channel);
     return channel.AddUser(user);
 }
コード例 #2
0
 private void RemoveUserFromChannel(User user, Channel channel)
 {
     channel.RemoveUser(user.Name);
     user.RemoveChannel(channel.Name);
 }
コード例 #3
0
        public IChannel GetChannel(String channelName)
        {
            if(_channels.Contains(channelName))
                return _channels[channelName];

            Channel channel = new Channel(this, channelName, _context);
            _channels.Add(channel);
            return channel;
        }