IConfigurationRoot Interface

Definition

Represents the root of an IConfiguration hierarchy.

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

Properties

Item[String]

Gets or sets a configuration value.

(Inherited from IConfiguration)
Providers

The IConfigurationProviders for this configuration.

Methods

GetChildren()

Gets the immediate descendant configuration sub-sections.

(Inherited from IConfiguration)
GetReloadToken()

Attempts to get an IChangeToken for change tracking.

(Inherited from IConfiguration)
GetSection(String)

Gets a configuration sub-section with the specified key.

(Inherited from IConfiguration)
Reload()

Force the configuration values to be reloaded from the underlying IConfigurationProviders.

Extension Methods

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>)

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.

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>)

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.

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)

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

GetValue(IConfiguration, Type, String, Object)

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

GetValue<T>(IConfiguration, String)

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

GetValue<T>(IConfiguration, String, T)

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

AsEnumerable(IConfiguration)

Get the enumeration of key-value pairs within the IConfiguration.

AsEnumerable(IConfiguration, Boolean)

Gets the enumeration of key-value pairs within the IConfiguration.

GetConnectionString(IConfiguration, String)

Retrieves the value with the specified key from the ConnectionStrings section of the configuration source. Calling this method is shorthand for GetSection("ConnectionStrings")[name].

GetRequiredSection(IConfiguration, String)

Gets the configuration subsection that has the specified key.

GetDebugView(IConfigurationRoot)

Generates a human-readable view of the configuration showing where each value came from.

GetDebugView(IConfigurationRoot, Func<ConfigurationDebugViewContext,String>)

Generates a human-readable view of the configuration showing where each value came from.

Applies to