IConfiguration Interface¶
Represents a set of key/value application configuration properties.
- Namespace
Microsoft.Extensions.Configuration- Assemblies
- Microsoft.Extensions.Configuration.Abstractions
Methods¶
-
GetChildren()¶ Gets the immediate descendant configuration sub-sections.
Return type: System.Collections.Generic.IEnumerable<Microsoft.Extensions.Configuration.IConfigurationSection> Returns: The configuration sub-sections. IEnumerable<IConfigurationSection> GetChildren()
-
GetReloadToken()¶ Returns a
Microsoft.Extensions.Primitives.IChangeTokenthat can be used to observe when this configuration is reloaded.Return type: Microsoft.Extensions.Primitives.IChangeToken Returns: A Microsoft.Extensions.Primitives.IChangeToken.IChangeToken GetReloadToken()
-
GetSection(System.String)¶ Gets a configuration sub-section with the specified key.
Arguments: key (System.String) – The key of the configuration section. Return type: Microsoft.Extensions.Configuration.IConfigurationSection Returns: The Microsoft.Extensions.Configuration.IConfigurationSection.IConfigurationSection GetSection(string key)
-
Properties¶
-
Microsoft.Extensions.Configuration.IConfiguration.Item[System.String]¶ Gets or sets a configuration value.
Arguments: key (System.String) – The configuration key. Return type: System.String Returns: The configuration value. string this[string key] { get; set; }
-