ConfigWrapper 1.0.1
See the version list below for details.
dotnet add package ConfigWrapper --version 1.0.1
NuGet\Install-Package ConfigWrapper -Version 1.0.1
<PackageReference Include="ConfigWrapper" Version="1.0.1" />
paket add ConfigWrapper --version 1.0.1
#r "nuget: ConfigWrapper, 1.0.1"
// Install ConfigWrapper as a Cake Addin
#addin nuget:?package=ConfigWrapper&version=1.0.1
// Install ConfigWrapper as a Cake Tool
#tool nuget:?package=ConfigWrapper&version=1.0.1
ConfigWrapper
A simple configuration wrapper to abstract config sources and offer sensible defaults.
Getting Started
Available on Nuget
Prerequisites
.net 4.0 +
Use
Simple values
var configWrapper = new AppSettingsConfigWrapper();
var sleepMs = configWrapper.Get<int>("sleep-time-in-ms", 1000);
In this example, we return 1000 if there is no configured value in the app.config or web.config file.
Arrays
var configWrapper = new AppSettingsConfigWrapper();
var items = configWrapper.Get<int>("sample-items", new [] {"pork", "beans"}, []{',''|'});
In this example, we return an array of strings from the config, delimited by , or |. If we have no values in config we get the array ["pork", "beans"]
Authors
See the list of contributors who participated in this project.
License
This project is licensed under the MIT License
Acknowledgments
- Hat tip to the teams at Spotlite (RallyHealth) and Guaranteed Rate where I wrote earlier versions of these concepts.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
This package has no dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ConfigWrapper:
Package | Downloads |
---|---|
ConfigWrapper.Json
Helper classes to make it easier to work with json config files. Part of the ConfigWrapper project. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.8.0 | 1,274 | 7/26/2018 |
1.7.1 | 791 | 7/26/2018 |
1.7.0 | 801 | 7/25/2018 |
1.6.0 | 958 | 7/20/2018 |
1.5.0 | 902 | 6/19/2018 |
1.4.1 | 933 | 6/12/2018 |
1.4.0 | 1,275 | 6/11/2018 |
1.3.1 | 921 | 6/7/2018 |
1.3.0 | 1,258 | 6/6/2018 |
1.2.1 | 808 | 5/25/2018 |
1.2.0 | 920 | 5/24/2018 |
1.1.0 | 946 | 5/24/2018 |
1.0.1 | 883 | 5/23/2018 |
1.0.0 | 1,052 | 5/23/2018 |
Improved class and function documentation.