Microsoft.Extensions.Configuration.Abstractions 9.0.10
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.
|
50 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
48 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
45 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
45 |
Microsoft.AspNetCore.Hosting.Abstractions
ASP.NET Core hosting and startup abstractions for web applications.
|
44 |
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
|
44 |
Microsoft.Extensions.Configuration.Binder
Functionality to bind an object to data in configuration providers for Microsoft.Extensions.Configuration.
When using NuGet 3.x this package requires at least version 3.4.
|
43 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
43 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
43 |
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.
|
43 |
Microsoft.Extensions.OptionsModel
Provides a strongly typed way of specifying and accessing settings using dependency injection.
|
42 |
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
|
42 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
42 |
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
|
42 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
When using NuGet 3.x this package requires at least version 3.4.
|
41 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
41 |
Microsoft.Extensions.Logging.Console
Console logger implementation.
|
41 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
41 |
FluentMigrator.Runner
FluentMigrator is a database migration framework for .NET written in C#. The basic idea is that you can create migrations which are simply classes that derive from the Migration base class and have a Migration attribute with a unique version number attached to them. Upon executing FluentMigrator, you tell it which version to migrate to and it will run all necessary migrations in order to bring your database up to that version. In addition to forward migration support, FluentMigrator also supports different ways to execute the migrations along with selective migrations called profiles and executing arbitrary SQL.
|
41 |
Microsoft.EntityFrameworkCore.Relational
Shared Entity Framework Core components for relational database providers.
|
41 |
.NET Framework 4.6.2
- Microsoft.Extensions.Primitives (>= 9.0.10)
- System.ValueTuple (>= 4.5.0)
.NET 8.0
- Microsoft.Extensions.Primitives (>= 9.0.10)
.NET 9.0
- Microsoft.Extensions.Primitives (>= 9.0.10)
.NET Standard 2.0
- Microsoft.Extensions.Primitives (>= 9.0.10)