Microsoft.Extensions.Configuration.Abstractions 9.0.0-rc.2.24473.5
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.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
|
12 |
Microsoft.AspNetCore.Hosting.Server.Abstractions
ASP.NET Core hosting server abstractions for web applications.
|
14 |
Microsoft.AspNetCore.Hosting.Server.Abstractions
ASP.NET Core hosting server abstractions for web applications.
This package was built from the source code at https://github.com/aspnet/Hosting/tree/0724e6cde1149ee1a19bfec9c13a2c9327b71213
|
23 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
12 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
13 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
|
20 |
Microsoft.Extensions.Configuration
Implementation of key-value pair based configuration for Microsoft.Extensions.Configuration. Includes the memory configuration provider.
This package was built from the source code at https://github.com/aspnet/Extensions/tree/9bc79b2f25a3724376d7af19617c33749a30ea3a
|
65 |
Microsoft.Extensions.Configuration.CommandLine
Command line configuration provider implementation for Microsoft.Extensions.Configuration. This package enables you to read configuration parameters from the command line arguments of your application. You can use CommandLineConfigurationExtensions.AddCommandLine extension method on IConfigurationBuilder to add the command line configuration provider to the configuration builder.
|
14 |
Microsoft.Extensions.Configuration.FileExtensions
Provides a base class for file-based configuration providers used with Microsoft.Extensions.Configuration and extension methods for configuring them.
|
14 |
Microsoft.Extensions.Hosting
Hosting and startup infrastructures for applications.
|
14 |
Microsoft.Extensions.Hosting.Abstractions
.NET Core hosting and startup abstractions for applications.
|
17 |
Microsoft.Extensions.Hosting.Abstractions
.NET Core hosting and startup abstractions for applications.
This package was built from the source code at https://github.com/aspnet/Hosting/tree/0724e6cde1149ee1a19bfec9c13a2c9327b71213
|
22 |
Microsoft.Extensions.Hosting.Abstractions
Hosting and startup abstractions for applications.
|
15 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
12 |
Microsoft.Extensions.Logging.Console
Console logger provider implementation for Microsoft.Extensions.Logging.
|
18 |
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
|
24 |
Microsoft.Extensions.Options.ConfigurationExtensions
Provides additional configuration specific functionality related to Options.
|
14 |
Microsoft.Extensions.Options.ConfigurationExtensions
Provides additional configuration specific functionality related to Options.
|
32 |
Microsoft.Extensions.Options.ConfigurationExtensions
Provides additional configuration specific functionality related to Options.
This package was built from the source code at https://github.com/aspnet/Extensions/tree/9bc79b2f25a3724376d7af19617c33749a30ea3a
|
18 |
.NET Framework 4.6.2
- Microsoft.Extensions.Primitives (>= 9.0.0-rc.2.24473.5)
- System.ValueTuple (>= 4.5.0)
.NET 8.0
- Microsoft.Extensions.Primitives (>= 9.0.0-rc.2.24473.5)
.NET 9.0
- Microsoft.Extensions.Primitives (>= 9.0.0-rc.2.24473.5)
.NET Standard 2.0
- Microsoft.Extensions.Primitives (>= 9.0.0-rc.2.24473.5)