IConfigurationSection IConfigurationSection IConfigurationSection Interface

Definition

Represents a section of application configuration values.

public interface IConfigurationSection : Microsoft.Extensions.Configuration.IConfiguration
type IConfigurationSection = interface
    interface IConfiguration
Public Interface IConfigurationSection
Implements IConfiguration
Derived
Implements

Properties

Key Key Key

Gets the key this section occupies in its parent.

Path Path Path

Gets the full path to this section within the IConfiguration.

Value Value Value

Gets or sets the section value.

Extension Methods

Bind(IConfiguration, Object) Bind(IConfiguration, Object) Bind(IConfiguration, Object)

Attempts to bind the given object instance to configuration values by matching property names against configuration keys recursively.

Bind(IConfiguration, Object, Action<BinderOptions>) Bind(IConfiguration, Object, Action<BinderOptions>) 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, String, Object) Bind(IConfiguration, String, Object) 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.

Get(IConfiguration, Type) Get(IConfiguration, Type) 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(IConfiguration, Type, Action<BinderOptions>) Get(IConfiguration, Type, Action<BinderOptions>) 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<T>(IConfiguration) Get<T>(IConfiguration) 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.

Get<T>(IConfiguration, Action<BinderOptions>) Get<T>(IConfiguration, Action<BinderOptions>) 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.

GetValue(IConfiguration, Type, String) GetValue(IConfiguration, Type, String) GetValue(IConfiguration, Type, String)

Extracts the value with the specified key and converts it to the specified type.

GetValue(IConfiguration, Type, String, Object) GetValue(IConfiguration, Type, String, Object) GetValue(IConfiguration, Type, String, Object)

Extracts the value with the specified key and converts it to the specified type.

GetValue<T>(IConfiguration, String) GetValue<T>(IConfiguration, String) GetValue<T>(IConfiguration, String)

Extracts the value with the specified key and converts it to type T.

GetValue<T>(IConfiguration, String, T) GetValue<T>(IConfiguration, String, T) GetValue<T>(IConfiguration, String, T)

Extracts the value with the specified key and converts it to type T.

AsEnumerable(IConfiguration) AsEnumerable(IConfiguration) AsEnumerable(IConfiguration)

Get the enumeration of key value pairs within the IConfiguration

AsEnumerable(IConfiguration, Boolean) AsEnumerable(IConfiguration, Boolean) AsEnumerable(IConfiguration, Boolean)

Get the enumeration of key value pairs within the IConfiguration

Exists(IConfigurationSection) Exists(IConfigurationSection) Exists(IConfigurationSection)

Determines whether the section has a Value or has children

GetConnectionString(IConfiguration, String) GetConnectionString(IConfiguration, String) GetConnectionString(IConfiguration, String)

Shorthand for GetSection("ConnectionStrings")[name].

Applies to