示例#1
0
        public static ChatRoomClient Create(int id, string name = null, params ChatClient[] clients)
        {
            ChatRoomClient result = new ChatRoomClient(id, name);

            result.Clients.AddRange(clients);

            return(result);
        }
示例#2
0
        public void Add(ChatRoomClient client)
        {
            if (IsExist(client.Id))
            {
                throw new ArgumentException(nameof(client.Id));
            }

            mRooms.Add(client.Id, client);
        }