Microsoft.Extensions.Configuration.Abstractions 10.0.11
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.IConfigurationMicrosoft.Extensions.Configuration.IConfigurationBuilderMicrosoft.Extensions.Configuration.IConfigurationProviderMicrosoft.Extensions.Configuration.IConfigurationRootMicrosoft.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.Extensions.Options.ConfigurationExtensions
Provides additional configuration specific functionality related to Options.
|
3 |
|
Microsoft.Extensions.Configuration.Json
JSON configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read your application's settings from a JSON file. You can use JsonConfigurationExtensions.AddJsonFile extension method on IConfigurationBuilder to add the JSON configuration provider to the configuration builder.
|
3 |
|
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
3 |
|
Aspire.StackExchange.Redis
A generic Redis® client that integrates with Aspire, including health checks, logging, and telemetry.
|
2 |
|
Microsoft.Extensions.Configuration.FileExtensions
Provides a base class for file-based configuration providers used with Microsoft.Extensions.Configuration and extension methods for configuring them.
|
2 |
|
Microsoft.Extensions.Hosting.Abstractions
Hosting and startup abstractions for applications.
|
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.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
2 |
|
Microsoft.Extensions.Configuration.Binder
Provides the functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration. This package enables you to represent the configuration data as strongly-typed classes defined in the application code. To bind a configuration, use the Microsoft.Extensions.Configuration.ConfigurationBinder.Get extension method on the IConfiguration object. To use this package, you also need to install a package for the configuration provider, for example, Microsoft.Extensions.Configuration.Json for the JSON provider.
|
2 |
|
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 |
|
EnyimMemcachedCore
EnyimMemcachedCore is a Memcached client library for .NET Core. Usage: Add services.AddEnyimMemcached(...) and app.UseEnyimMemcached() in Startup. Add IMemcachedClient into constructor.
|
2 |
|
Microsoft.AspNetCore.Cors
CORS middleware and policy for ASP.NET Core to enable cross-origin resource sharing.
Commonly used types:
Microsoft.AspNetCore.Cors.DisableCorsAttribute
Microsoft.AspNetCore.Cors.EnableCorsAttribute
This package was built from the source code at https://github.com/aspnet/CORS/tree/f05b0e792d2361be214947798857ef3eac77825d
|
2 |
|
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
This package was built from the source code at https://github.com/aspnet/Extensions/tree/9bc79b2f25a3724376d7af19617c33749a30ea3a
|
2 |
|
Microsoft.AspNetCore.Rewrite
ASP.NET Core basic middleware for rewriting URLs. Includes:
* Support for custom URL rewrite rules
* Support for running IIS URL Rewrite module rules
* Support for running Apache mod_rewrite rules.
This package was built from the source code at https://github.com/aspnet/BasicMiddleware/tree/2d3ad1cb0f9872da40c6d143ce4554563971ae04
|
2 |
|
Microsoft.AspNetCore.Hosting.Server.Abstractions
ASP.NET Core hosting server abstractions for web applications.
|
2 |
|
System.ClientModel
Contains building blocks for clients that call cloud services.
|
2 |
|
Microsoft.Orleans.Core
Core library of Microsoft Orleans used both on the client and server.
|
2 |
|
Microsoft.Orleans.Core.Abstractions
Core abstractions library of Microsoft Orleans
|
2 |
|
Microsoft.VisualStudio.Web.CodeGeneration.Design
Code Generation tool for ASP.NET Core. Contains the dotnet-aspnet-codegenerator command used for generating controllers and views.
|
2 |
|
Microsoft.VisualStudio.Web.CodeGenerators.Mvc
Code Generators for ASP.NET Core MVC. Contains code generators for MVC Controllers and Views.
|
2 |
.NET Framework 4.6.2
- Microsoft.Extensions.Primitives (>= 10.0.11)
- System.ValueTuple (>= 4.6.2)
.NET 8.0
- Microsoft.Extensions.Primitives (>= 10.0.11)
.NET 9.0
- Microsoft.Extensions.Primitives (>= 10.0.11)
.NET 10.0
- Microsoft.Extensions.Primitives (>= 10.0.11)
.NET Standard 2.0
- Microsoft.Extensions.Primitives (>= 10.0.11)