public static void ConfigureGameFrameworkDefaults(IGameHostBuilder builder) { builder.ConfigureAppConfiguration((context, cb) => { if (context.HostingEnvironment.EnvironmentName == "Development") { } }) .ConfigureFramework(); }
/// <summary> /// Adds a delegate for configuring the <see cref="IConfigurationBuilder"/> that will construct an <see cref="IConfiguration"/>. /// </summary> /// <param name="hostBuilder">The <see cref="IGameHostBuilder"/> to configure.</param> /// <param name="configureDelegate">The delegate for configuring the <see cref="IConfigurationBuilder" /> that will be used to construct an <see cref="IConfiguration" />.</param> /// <returns>The <see cref="IGameHostBuilder"/>.</returns> /// <remarks> /// The <see cref="IConfiguration"/> and <see cref="ILoggerFactory"/> on the <see cref="GameHostBuilderContext"/> are uninitialized at this stage. /// The <see cref="IConfigurationBuilder"/> is pre-populated with the settings of the <see cref="IGameHostBuilder"/>. /// </remarks> public static IGameHostBuilder ConfigureAppConfiguration(this IGameHostBuilder hostBuilder, Action <IConfigurationBuilder> configureDelegate) => hostBuilder.ConfigureAppConfiguration((context, builder) => configureDelegate(builder));