Exemplo n.º 1
0
        public void Accept(string connectionId)
        {
            var user = InvitedUsers.FirstOrDefault(u => u.ConnectionId == connectionId);

            if (user != null)
            {
                user.Status = GameUserStatus.Joined;
            }
        }
Exemplo n.º 2
0
        public void Decline(string connectionId)
        {
            var user = InvitedUsers.FirstOrDefault(u => u.ConnectionId == connectionId);

            if (user != null)
            {
                lock (m_lock)
                {
                    if (InvitedUsers.Remove(user))
                    {
                        user.Status = GameUserStatus.NotInvitedYet;
                    }
                }
            }
        }