Microsoft.Extensions.Configuration.Abstractions 8.0.0
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
Related Packages
- Microsoft.Extensions.Configuration
- Microsoft.Extensions.Configuration.Binder
- Microsoft.Extensions.Configuration.CommandLine
- Microsoft.Extensions.Configuration.EnvironmentVariables
- Microsoft.Extensions.Configuration.FileExtensions
- Microsoft.Extensions.Configuration.Ini
- Microsoft.Extensions.Configuration.Json
- Microsoft.Extensions.Configuration.UserSecrets
- Microsoft.Extensions.Configuration.Xml
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.
Showing the top 20 packages that depend on Microsoft.Extensions.Configuration.Abstractions.
Packages | Downloads |
---|---|
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
|
4 |
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
3 |
Microsoft.Orleans.Reminders.AzureStorage
Microsoft Orleans reminders provider backed by Azure Table Storage
|
3 |
Microsoft.AspNetCore.All
Provides a default set of APIs for building an ASP.NET Core application, and also includes API for third-party integrations with ASP.NET Core.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
3 |
Microsoft.Extensions.Configuration.Xml
XML configuration provider implementation for Microsoft.Extensions.Configuration.
When using NuGet 3.x this package requires at least version 3.4.
|
3 |
Microsoft.EntityFrameworkCore.SqlServer
Microsoft SQL Server database provider for Entity Framework Core.
|
3 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
3 |
Microsoft.Extensions.Configuration.Xml
XML configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from XML files. You can use XmlConfigurationExtensions.AddXmlFile extension method on IConfigurationBuilder to add XML configuration provider to the configuration builder.
|
3 |
Microsoft.AspNetCore.App
Provides a default set of APIs for building an ASP.NET Core application.
This package requires the ASP.NET Core runtime. This runtime is installed by the .NET Core SDK, or can be acquired separately using installers available at https://aka.ms/dotnet-download.
|
2 |
Serilog.Settings.Configuration
Microsoft.Extensions.Configuration (appsettings.json) support for Serilog.
|
2 |
Microsoft.Extensions.Http
The HttpClient factory is a pattern for configuring and retrieving named HttpClients in a composable way. The HttpClient factory provides extensibility to plug in DelegatingHandlers that address cross-cutting concerns such as service location, load balancing, and reliability. The default HttpClient factory provides built-in diagnostics and logging and manages the lifetimes of connections in a performant way.
Commonly Used Types:
System.Net.Http.IHttpClientFactory
|
2 |
Microsoft.Extensions.Hosting.Abstractions
.NET Core hosting and startup abstractions for applications.
|
2 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
2 |
Microsoft.AspNetCore.App
Microsoft.AspNetCore.App
|
2 |
Microsoft.Orleans.Streaming.AzureStorage
Microsoft Orleans streaming provider backed by Azure Queue Storage
|
2 |
Microsoft.Orleans.Persistence.AzureStorage
Microsoft Orleans persistence providers backed by Azure Storage
|
2 |
Microsoft.Orleans.Core
Core library of Microsoft Orleans used both on the client and server.
|
2 |
.NET Framework 4.6.2
- Microsoft.Extensions.Primitives (>= 8.0.0)
- System.ValueTuple (>= 4.5.0)
.NET 6.0
- Microsoft.Extensions.Primitives (>= 8.0.0)
.NET 7.0
- Microsoft.Extensions.Primitives (>= 8.0.0)
.NET 8.0
- Microsoft.Extensions.Primitives (>= 8.0.0)
.NET Standard 2.0
- Microsoft.Extensions.Primitives (>= 8.0.0)