Update Configuration doc to use double underscores instead of colons for hierarchical config keys (4968) (#5876)

* changes to configuration doc

* fixes for scott

* change for Dan

* Update index.md

* Code fence double underscore and add missing period

* Eliminate unnecessary sentence
pull/5893/head
Isaac Levin 2018-04-05 14:34:39 -04:00 committed by Scott Addie
parent f0b32d093d
commit f8f7cc2d8c
1 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@ The app reads and displays the following configuration settings:
[!code-json[](index/sample/ConfigJson/appsettings.json)]
Configuration consists of a hierarchical list of name-value pairs in which the nodes are separated by a colon. To retrieve a value, access the `Configuration` indexer with the corresponding item's key:
Configuration consists of a hierarchical list of name-value pairs in which the nodes are separated by a colon (`:`). To retrieve a value, access the `Configuration` indexer with the corresponding item's key:
[!code-csharp[](index/sample/ConfigJson/Program.cs?range=21-22)]
@ -100,15 +100,15 @@ When the environment is set to `Staging`, the following `Configure` method reads
[!code-csharp[](index/sample/StartupConfig.cs?name=snippet&highlight=3,4)]
The environment is typically set to `Development`, `Staging`, or `Production`. For more information, see [Work with multiple environments](xref:fundamentals/environments).
Configuration considerations:
* `IOptionsSnapshot` can reload configuration data when it changes. For more information, see [IOptionsSnapshot](xref:fundamentals/configuration/options#reload-configuration-data-with-ioptionssnapshot).,
* [IOptionsSnapshot](xref:fundamentals/configuration/options#reload-configuration-data-with-ioptionssnapshot) can reload configuration data when it changes.
* Configuration keys are **not** case-sensitive.
* **Never** store passwords or other sensitive data in configuration provider code or in plain text configuration files. Don't use production secrets in development or test environments. Specify secrets outside of the project so that they can't be accidentally committed to a source code repository. Learn more about [how to work with multiple environments](xref:fundamentals/environments) and managing [safe storage of app secrets in development](xref:security/app-secrets).
* If a colon (`:`) can't be used in environment variables on a system, replace the colon (`:`) with a double-underscore (`__`).
* For hierarchical config values specified in environment variables, a colon (`:`) may not work on all platforms. Double underscore (`__`) is supported by all platforms.
* When interacting with the configuration API, a colon (`:`) works on all platforms.
## In-memory provider and binding to a POCO class