Alexandria.AlexandriaManager.GetGame C# (CSharp) Метод

GetGame() публичный Метод

Search for the first Game with the given Type, or return null if not found. An exact match is attempted first, and then the first Game to inherit from the Type is matched.
public GetGame ( Type gameType ) : Game
gameType System.Type
Результат Game
        public Game GetGame(Type gameType)
        {
            foreach (Game game in AllGames)
                if (game.GetType() == gameType)
                    return game;
            foreach (Game game in AllGames)
                if (game.GetType().IsSubclassOf(gameType))
                    return game;
            return null;
        }