IsRegistered() public method

Determines if the specified game mode is in the registry.
public IsRegistered ( string p_strGameModeId ) : bool
p_strGameModeId string The id of the game mode whose presence in the registry is to be determined.
return bool
        /// <summary>
        /// Loads the factories for games that have been previously detected as installed.
        /// </summary>
        /// <param name="supportedGameModes">A registry containing the factories for all supported game modes.</param>
        /// <param name="environmentInfo">The application's environment info.</param>
        /// <returns>A registry containing all of the game mode factories for games that were previously detected as installed.</returns>
        public static GameModeRegistry LoadInstalledGameModes(GameModeRegistry supportedGameModes, EnvironmentInfo environmentInfo)
        {
            Trace.TraceInformation("Loading Game Mode Factories for Installed Games...");
            Trace.Indent();

            var installedGameModes = new GameModeRegistry();

            foreach (var gameId in environmentInfo.Settings.InstalledGames)
            {
                Trace.Write($"Loading {gameId}: ");

                if (supportedGameModes.IsRegistered(gameId))
                {
                    Trace.WriteLine("Supported");
                    installedGameModes.RegisterGameMode(supportedGameModes.GetGameMode(gameId));
                }
                else
                {
                    Trace.WriteLine("Not Supported");
                }
            }

            Trace.Unindent();
            return(installedGameModes);
        }
        /// <summary>
        /// Loads the factories for games that have been previously detected as installed.
        /// </summary>
        /// <param name="p_gmrSupportedGameModes">A registry containing the factories for all supported game modes.</param>
        /// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
        /// <returns>A registry containing all of the game mode factories for games that were previously detected as installed.</returns>
        public static GameModeRegistry LoadInstalledGameModes(GameModeRegistry p_gmrSupportedGameModes, EnvironmentInfo p_eifEnvironmentInfo)
        {
            Trace.TraceInformation("Loading Game Mode Factories for Installed Games...");
            Trace.Indent();

            GameModeRegistry gmrInstalled = new GameModeRegistry();

            foreach (string strGameId in p_eifEnvironmentInfo.Settings.InstalledGames)
            {
                Trace.Write(String.Format("Loading {0}: ", strGameId));
                if (p_gmrSupportedGameModes.IsRegistered(strGameId))
                {
                    Trace.WriteLine("Supported");
                    gmrInstalled.RegisterGameMode(p_gmrSupportedGameModes.GetGameMode(strGameId));
                }
                else
                {
                    Trace.WriteLine("Not Supported");
                }
            }

            Trace.Unindent();
            return(gmrInstalled);
        }
		/// <summary>
		/// Loads the factories for games that have been previously detected as installed.
		/// </summary>
		/// <param name="p_gmrSupportedGameModes">A registry containing the factories for all supported game modes.</param>
		/// <param name="p_eifEnvironmentInfo">The application's envrionment info.</param>
		/// <returns>A registry containing all of the game mode factories for games that were previously detected as installed.</returns>
		public static GameModeRegistry LoadInstalledGameModes(GameModeRegistry p_gmrSupportedGameModes, EnvironmentInfo p_eifEnvironmentInfo)
		{
			Trace.TraceInformation("Loading Game Mode Factories for Installed Games...");
			Trace.Indent();
			
			GameModeRegistry gmrInstalled = new GameModeRegistry();
			foreach (string strGameId in p_eifEnvironmentInfo.Settings.InstalledGames)
			{
				Trace.Write(String.Format("Loading {0}: ", strGameId));
				if (p_gmrSupportedGameModes.IsRegistered(strGameId))
				{
					Trace.WriteLine("Supported");
					gmrInstalled.RegisterGameMode(p_gmrSupportedGameModes.GetGameMode(strGameId));
				}
				else
					Trace.WriteLine("Not Supported");
			}
			
			Trace.Unindent();
			return gmrInstalled;
		}