public IChatroom joinTopic(string topic) { if(topicsChatRoom.Contains(topic)) { TextChatRoom cr = new TextChatRoom(topic); if( (topicsChatRoom[topic] != null) && (topicsChatRoom[topic] is List<IChatroom>)) { List<IChatroom> l = (List<IChatroom>) topicsChatRoom[topic]; l.Add(cr); } return cr; } else { Console.WriteLine("Topic non existant"); return null; } }
public ServerChatRoom(IPAddress Ip, String topicName) : base(Ip) { concretCR = new TextChatRoom(topicName); }