Пример #1
0
        public async Task FetchMyPlaceholderImgUrl(string roomCode)
        {
            roomCode = roomCode.ToUpper();

            List <DrawPlayer> players   = _drawService.GetUsersInRoom(roomCode);
            string            urlString = "";

            foreach (DrawPlayer player in players)
            {
                if (player.ConnectionString == Context.ConnectionId)
                {
                    urlString = player.ImageUrl;
                    break;
                }
            }

            Console.WriteLine($"player with connection id {Context.ConnectionId} has imgUrl {urlString}");
            await Clients.Caller.SendAsync("FetchedYourImgUrl", urlString);
        }