static void OnRoomJoin(JoinRoom msg, IOperationContext context)
        {
            var newMember = new RoomMember
            {
                RoomName    = msg.RoomName,
                UserName    = msg.ClientName,
                UserChannel = context.ReplyChannel
            };
            List <RoomMember> members;

            if (!Rooms.TryGetValue(msg.RoomName, out members))
            {
                members = new List <RoomMember> {
                    newMember
                };
                Rooms.Add(msg.RoomName, members);
            }
            else
            {
                if (members.Any(x => x.UserName == msg.ClientName))
                {
                    context.ReplyChannel.Reply(context, new JoinRoomResponse()
                    {
                        RetCode = JoinRoomRetCode.NameIsTaken
                    });
                    return;
                }
                else
                {
                    members.ForEach((m) => m.UserChannel.Send(new RoomEvent()
                    {
                        UserName = msg.ClientName, Text = "Joined"
                    }));
                    members.Add(newMember);
                }
            }
            RoomMembers.Add(context.ReplyChannel, newMember);

            context.ReplyChannel.Reply(context, new JoinRoomResponse()
            {
                RetCode = JoinRoomRetCode.Ok
            });
        }
        static void OnRoomJoin(JoinRoom msg, IOperationContext context)
        {
            var newMember = new RoomMember
            {
                RoomName = msg.RoomName,
                UserName = msg.ClientName,
                UserChannel = context.ReplyChannel
            };
            List<RoomMember> members;
            if (!Rooms.TryGetValue(msg.RoomName, out members))
            {
                
                members = new List<RoomMember> { newMember };
                Rooms.Add(msg.RoomName, members);
            }
            else
            {
                if (members.Any(x => x.UserName == msg.ClientName))
                {
                    context.ReplyChannel.Reply(context, new JoinRoomResponse(){RetCode = JoinRoomRetCode.NameIsTaken});
                    return;
                }
                else
                {
                    members.ForEach((m) => m.UserChannel.Send(new RoomEvent(){UserName = msg.ClientName, Text = "Joined"}));
                    members.Add(newMember);
                }
            }
            RoomMembers.Add(context.ReplyChannel, newMember);

            context.ReplyChannel.Reply(context, new JoinRoomResponse() { RetCode = JoinRoomRetCode.Ok });
        }