private ChannelUser AddUserToChannel(User user, Channel channel) { user.AddChannel(channel); return channel.AddUser(user); }
private void RemoveUserFromChannel(User user, Channel channel) { channel.RemoveUser(user.Name); user.RemoveChannel(channel.Name); }
public IChannel GetChannel(String channelName) { if(_channels.Contains(channelName)) return _channels[channelName]; Channel channel = new Channel(this, channelName, _context); _channels.Add(channel); return channel; }