Exemplo n.º 1
0
 public bool RemoveRoom(int roomId, ChatorRoom room)
 {
     if (_roomDict.ContainsKey(roomId))
     {
         return(_roomDict.Remove(roomId));
     }
     return(false);
 }
Exemplo n.º 2
0
        public RoomManager(int roomNumber)
        {
            _roomDict = new Dictionary <int, ChatorRoom>();
            if (roomNumber > 0)
            {
                Enumerable.Range(1001, roomNumber).ToList().ForEach(e =>
                {
                    _roomDict[e] = new ChatorRoom(e);
                });
            }

            _roomDict[0] = new ChatorRoom(0);
        }
Exemplo n.º 3
0
 public bool AddRoom(int roomId, ChatorRoom room)
 {
     _roomDict[roomId] = room;
     return(true);
 }