public Task SendPlayer(string user, string connectionId) { if (playerStorage.GetByUsername(user) == null) { playerStorage.Add(new Player(user, connectionId)); return(Clients.All.SendAsync("ReceiveUser", user)); } else { return(Clients.Caller.SendAsync("PlayerExists", user)); } }