JLib.Configuration
0.7.3
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package JLib.Configuration --version 0.7.3
NuGet\Install-Package JLib.Configuration -Version 0.7.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="JLib.Configuration" Version="0.7.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add JLib.Configuration --version 0.7.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: JLib.Configuration, 0.7.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install JLib.Configuration as a Cake Addin #addin nuget:?package=JLib.Configuration&version=0.7.3 // Install JLib.Configuration as a Cake Tool #tool nuget:?package=JLib.Configuration&version=0.7.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Project. JLib.Configuration
provides reflection based config section access either direct or via dependency injection.
Adding Config to Service Collections
using JLib.Configuration;
using JLib.Reflection.DependencyInjection;
IConfiguration myConfig = ...;
// ...
var services = new ServiceCollection ()
.AddTypeCache(out var typeCache, nameof(JLib))
.AddAllConfigSections(myConfig, typeCache)
// ...
;
// ...
using var provider = services.BuildServiceProvider();
var section = provider.Services.GetRequiredService<MyConfigSection>();
[ConfigSectionName("Test")]
public class MyConfigSection
{
public string MyValue { get; init; }
}
Directly retrieving config section objects
using JLib.Configuration;
IConfiguration myConfig = ...;
var configSection myConfig.GetConfigSectionObject<MyConfigSection>();
[ConfigSectionName("Test")]
public class MyConfigSection
{
public string MyValue { get; init; }
}
Environment Behavior
{
"Environment": "Dev1",
"SectionA":{
"Environment": "Dev2",
"Dev1":{
"MyValue":"Ignored"
},
"Dev2":{
"MyValue":"Used"
},
"MyValue":"Ignored"
},
"SectionB":{
"Dev1":{
"MyValue":"Used"
},
"Dev2":{
"MyValue":"Ignored"
},
"MyValue":"Ignored"
},
"SectionC":{
"Environment": "",
"Dev1":{
"MyValue":"Ignored"
},
"Dev2":{
"MyValue":"Ignored"
},
"MyValue":"Used"
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- JLib.Reflection (>= 0.7.3)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
-
net7.0
- JLib.Reflection (>= 0.7.3)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
-
net8.0
- JLib.Reflection (>= 0.7.3)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.Configuration.Binder (>= 8.0.2)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on JLib.Configuration:
Package | Downloads |
---|---|
JLib.DependencyInjection
Package Description |
|
JLib
Metapackage for all JLIb packages |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.8.8 | 354 | 10/18/2024 |
0.8.7 | 260 | 10/18/2024 |
0.8.6 | 204 | 10/17/2024 |
0.8.5 | 291 | 9/18/2024 |
0.8.4 | 244 | 9/18/2024 |
0.8.3 | 285 | 9/11/2024 |
0.8.1 | 350 | 9/2/2024 |
0.8.0 | 266 | 8/28/2024 |
0.7.6 | 283 | 8/27/2024 |
0.7.5 | 252 | 8/27/2024 |
0.7.4 | 276 | 8/27/2024 |
0.7.3 | 271 | 8/27/2024 |
0.7.1 | 281 | 7/24/2024 |
0.7.0 | 447 | 7/23/2024 |
0.6.2 | 534 | 4/10/2024 |
0.6.1 | 284 | 3/15/2024 |
0.6.0 | 279 | 3/15/2024 |
0.5.0 | 280 | 3/14/2024 |
0.4.5 | 291 | 3/13/2024 |
0.4.4 | 279 | 3/12/2024 |
0.4.3 | 356 | 3/12/2024 |
0.4.2 | 324 | 3/7/2024 |
0.4.1 | 296 | 3/7/2024 |
0.4.0 | 308 | 3/6/2024 |
0.3.0 | 304 | 2/29/2024 |
0.2.0 | 298 | 2/14/2024 |