Info
Version: | 1.0.1.6 |
Author(s): | Mark Kemper |
Last Update: | Saturday, May 16, 2015 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | http://github.com/markkemper1/DotNetConfigHelper |
NuGet Url: | https://www.nuget.org/packages/DotNetConfigHelper |
Install
Install-Package DotNetConfigHelper
dotnet add package DotNetConfigHelper
paket add DotNetConfigHelper
DotNetConfigHelper Download (Unzip the "nupkg" after downloading)
Dependencies
- WebActivatorEx(2.0)
e.g
config["api_endpoint"].ToUri();
config.Optional("ap_timeout", 30).ToInt();
config.Required("temp_dir")
.ToDirectoryInfo()
.MustExist();
It can also read a list of settings from a text and then replace those values e.g.
env.config contains
my_password=123
appSettings
key="connectionstring" value="Username=test;password=%my_passsword%"
This can be used to keep you secrets out of the appSettings and out of source control.
It will also walk up directories looking for a env.config file.