Microsoft.Extensions.Configuration.Abstractions (10.0.3)

Published 2026-02-21 13:18:49 +03:30 by kayer

Installation

dotnet nuget add source --name kayer --username your_username --password your_token 
dotnet add package --source kayer --version 10.0.3 Microsoft.Extensions.Configuration.Abstractions

About this package

Provides abstractions of key-value pair based configuration. Interfaces defined in this package are implemented by classes in Microsoft.Extensions.Configuration and other configuration packages.

About

Provides abstractions of key-value pair based configuration. Interfaces defined in this package are implemented by classes in Microsoft.Extensions.Configuration and other configuration packages.

Key Features

  • Abstractions for string key-value pair configuration sources and sections
  • Path conventions of keys establishing a heirachy of values
  • Support for multiple configuration sources, aggregating and defining precdence for values
  • Support for reload on change

How to Use

The example below shows a small code sample using this library and trying out the ConfigurationKeyName attribute available since .NET 6:

public class MyClass
{
    [ConfigurationKeyName("named_property")]
    public string NamedProperty { get; set; }
}

Given the simple class above, we can create a dictionary to hold the configuration data and use it as the memory source to build a configuration section:

var dic = new Dictionary<string, string>
{
    {"named_property", "value for named property"},
};

var config = new ConfigurationBuilder()
    .AddInMemoryCollection(dic)
    .Build();

var options = config.Get<MyClass>();
Console.WriteLine(options.NamedProperty); // returns "value for named property"

Main Types

The main types provided by this library are:

  • Microsoft.Extensions.Configuration.IConfiguration
  • Microsoft.Extensions.Configuration.IConfigurationBuilder
  • Microsoft.Extensions.Configuration.IConfigurationProvider
  • Microsoft.Extensions.Configuration.IConfigurationRoot
  • Microsoft.Extensions.Configuration.IConfigurationSection

Additional Documentation

Feedback & Contributing

Microsoft.Extensions.Caching.Abstractions is released as open source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Dependencies

ID Version Target Framework
Microsoft.Extensions.Primitives 10.0.3 .NETFramework4.6.2
System.ValueTuple 4.6.1 .NETFramework4.6.2
Microsoft.Extensions.Primitives 10.0.3 .NETStandard2.0
Microsoft.Extensions.Primitives 10.0.3 net10.0
Microsoft.Extensions.Primitives 10.0.3 net8.0
Microsoft.Extensions.Primitives 10.0.3 net9.0
Details
NuGet
2026-02-21 13:18:49 +03:30
6
Microsoft
145 KiB
Assets (2)
Versions (4) View all
10.0.3 2026-02-21
10.0.0 2026-02-20
9.0.10 2026-02-04
9.0.0 2026-02-04