projects/configurations/README.md
This section is all about configuration, from memory configuration to INI, JSON and XML.
This is the 'hello world' of configuration. Just use WebApplication.Configuration read/write values to/from it.
Use IOptions at the most basic.
Configuration - Environment variables
Load environment variables and display all of them.
Read from INI file.
Configuration - INI file - Options
Read from INI file (with nested keys) and IOptions.
Read from XML file.
Note: This Xml Configuration provider does not support repeated element.
The following configuration settings will break:
<appSettings>
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
</appSettings>
On the other hand you can get unlimited nested elements and also attributes.
Configuration - XML file - Options
Read from XML file and use IOptions.
Read related configuration values using the options pattern
Thanks to @khusroohayat.
Read related configuration values using the IOptions interface
Thanks to @khusroohayat.
Configuration - IOption Array Bind array values from appsettings.json and read them using the IOptions interface
dotnet8