ConfigurationExtensions
Extension methods for configuration classes.
public static IConfigurationBuilder Add<TSource>(this IConfigurationBuilder builder, Action<TSource> configureSource) where TSource : IConfigurationSource
Adds a new configuration source.
public static IEnumerable<KeyValuePair<string, string>> AsEnumerable(this IConfiguration configuration)
Get the enumeration of key-value pairs within the IConfiguration.
public static IEnumerable<KeyValuePair<string, string>> AsEnumerable(this IConfiguration configuration, bool makePathsRelative)
Gets the enumeration of key-value pairs within the IConfiguration.
Determines whether the section has a Value or has children.
Retrieves the value with the specified key from the ConnectionStrings section of the configuration source. Calling this method is shorthand for GetSection("ConnectionStrings")[name].
public static IConfigurationSection GetRequiredSection(this IConfiguration configuration, string key)
Gets the configuration subsection that has the specified key.