Exposes configuration factory including legacy xml files support.
Package | NuGet |
---|---|
Extensions.Configuration.Factory |
It is available on Nuget.
Install-Package Extensions.Configuration.Factory -Version 2.3.0
The following code demonstrates basic usage of configuration factory.
appsettings.json:
{
"ParentKey" : {
"ChildKey" : "xxx"
}
}
App/Web.Config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="ParentKey:ChildKey" value="xxx" />
</appSettings>
</configuration>
var config = ConfigurationFactory.Instance.GetConfiguration();
var value = config["ParentKey:ChildKey"];
If you want to help with the project, feel free to open pull requests and submit issues.
If you would like to show your support for this project, then please feel free to buy me a coffee.