React to aspnet/Configuration #194

This commit is contained in:
Kirthi Krishnamraju 2015-05-22 05:21:32 -07:00
parent 186d4cde42
commit 0abe9e2b1f
2 changed files with 4 additions and 2 deletions

View File

@ -29,9 +29,10 @@ namespace ServerComparison.TestSites
{
//Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources,
//then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely.
Configuration = new ConfigurationSection(env.ApplicationBasePath)
var builder = new ConfigurationBuilder(env.ApplicationBasePath)
.AddJsonFile("config.json")
.AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.
Configuration = builder.Build();
}
public IConfiguration Configuration { get; private set; }

View File

@ -32,9 +32,10 @@ namespace ServerComparison.TestSites
{
//Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources,
//then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely.
Configuration = new ConfigurationSection(env.ApplicationBasePath)
var builder = new ConfigurationBuilder(env.ApplicationBasePath)
.AddJsonFile("config.json")
.AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values.
Configuration = builder.Build();
}
public IConfiguration Configuration { get; private set; }