JLib.Configuration 0.11.2

Prefix Reserved
dotnet add package JLib.Configuration --version 0.11.2
                    
NuGet\Install-Package JLib.Configuration -Version 0.11.2
                    
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.11.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="JLib.Configuration" Version="0.11.2" />
                    
Directory.Packages.props
<PackageReference Include="JLib.Configuration" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add JLib.Configuration --version 0.11.2
                    
#r "nuget: JLib.Configuration, 0.11.2"
                    
#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.
#:package JLib.Configuration@0.11.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=JLib.Configuration&version=0.11.2
                    
Install as a Cake Addin
#tool nuget:?package=JLib.Configuration&version=0.11.2
                    
Install as a Cake Tool

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 Compatible and additional computed target framework versions.
.NET 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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.11.2 379 5/12/2025
0.11.1 272 2/21/2025
0.11.0 270 2/19/2025
0.10.0 284 2/17/2025
0.9.5 466 1/30/2025
0.9.4 347 1/29/2025
0.9.3 386 1/28/2025
0.9.2 338 1/22/2025
0.9.1 348 1/22/2025
0.9.0 441 1/20/2025
0.8.8 645 10/18/2024
0.8.7 416 10/18/2024
0.8.6 355 10/17/2024
0.8.5 439 9/18/2024
0.8.4 405 9/18/2024
0.8.3 444 9/11/2024
0.8.1 638 9/2/2024
0.8.0 407 8/28/2024
0.7.6 426 8/27/2024
0.7.5 395 8/27/2024
0.7.4 426 8/27/2024
0.7.3 411 8/27/2024
0.7.1 427 7/24/2024
0.7.0 718 7/23/2024
0.6.2 676 4/10/2024
0.6.1 420 3/15/2024
0.6.0 421 3/15/2024
0.5.0 448 3/14/2024
0.4.5 438 3/13/2024
0.4.4 429 3/12/2024
0.4.3 509 3/12/2024
0.4.2 476 3/7/2024
0.4.1 460 3/7/2024
0.4.0 460 3/6/2024
0.3.0 457 2/29/2024
0.2.0 435 2/14/2024