Beispiel #1
0
        // Gets games from my Custom API
        // Works the same as above but it gets it from my custom API instead of the Rawg API
        public async Task <List <Game> > GetCustomGames(string search, HomePage.ErrorHandling errorMessage)
        {
            bool connection = _checkConnection.hasConnection(errorMessage);

            if (connection)
            {
                // Shorthand code
                return(!string.IsNullOrEmpty(search) ? await _customGameProxy.GetGamesBySearch(errorMessage, search) ?? null : await _customGameProxy.GetAllGames(errorMessage) ?? null);
            }
            else
            {
                return(null);
            }
        }