Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
IConfigurationSection Interface
Definition
- Namespace:
- Microsoft.Extensions.Configuration
- Assembly:
- Microsoft.Extensions.Configuration.Abstractions.dll
- Package:
- Microsoft.Extensions.Configuration.Abstractions v11.0.0-preview.5.26302.115
- Source:
- IConfigurationSection.cs
- Source:
- IConfigurationSection.cs
- Source:
- IConfigurationSection.cs
- Source:
- IConfigurationSection.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a section of application configuration values.
public interface class IConfigurationSection : Microsoft::Extensions::Configuration::IConfiguration
public interface IConfigurationSection : Microsoft.Extensions.Configuration.IConfiguration
type IConfigurationSection = interface
interface IConfiguration
Public Interface IConfigurationSection
Implements IConfiguration
- Derived
- Implements
Properties
| Name | Description |
|---|---|
| Item[String] |
Gets or sets a configuration value. (Inherited from IConfiguration) |
| Key |
Gets the key this section occupies in its parent. |
| Path |
Gets the full path to this section within the IConfiguration. |
| Value |
Gets or sets the section value. |
Methods
| Name | Description |
|---|---|
| GetChildren() |
Gets the immediate descendant configuration sub-sections. (Inherited from IConfiguration) |
| GetReloadToken() |
Returns a IChangeToken that can be used to observe when this configuration is reloaded. (Inherited from IConfiguration) |
| GetSection(String) |
Gets a configuration sub-section with the specified key. (Inherited from IConfiguration) |
Extension Methods
| Name | Description |
|---|---|
| AsEnumerable(IConfiguration, Boolean) |
Get the enumeration of key value pairs within the IConfiguration |
| AsEnumerable(IConfiguration) |
Get the enumeration of key value pairs within the IConfiguration |
| Bind(IConfiguration, Object, Action<BinderOptions>) |
Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. |
| Bind(IConfiguration, Object) |
Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively. |
| Bind(IConfiguration, String, Object) |
Attempts to bind the given object instance to the configuration section specified by the key by matching property names against configuration keys recursively. |
| Exists(IConfigurationSection) |
Determines whether the section has a Value or has children. |
| Get(IConfiguration, Type, Action<BinderOptions>) |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
| Get(IConfiguration, Type) |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
| Get<T>(IConfiguration, Action<BinderOptions>) |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
| Get<T>(IConfiguration) |
Attempts to bind the configuration instance to a new instance of type T. If this configuration section has a value, that will be used. Otherwise binding by matching property names against configuration keys recursively. |
| GetConnectionString(IConfiguration, String) |
Gets the specified connection string from the specified configuration.
Shorthand for |
| GetRequiredSection(IConfiguration, String) |
Gets a configuration subsection with the specified key. |
| GetValue(IConfiguration, Type, String, Object) |
Extracts the value with the specified key and converts it to the specified type. |
| GetValue(IConfiguration, Type, String) |
Extracts the value with the specified key and converts it to the specified type. |
| GetValue<T>(IConfiguration, String, T) |
Extracts the value with the specified key and converts it to type T. |
| GetValue<T>(IConfiguration, String) |
Extracts the value with the specified key and converts it to type T. |
Applies to
Feedback
Was this page helpful?
