<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0-preview.4.21253.7" />

ConfigurationExtensions

public static class 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)

Get the enumeration of key value pairs within the IConfiguration

public static bool Exists(this IConfigurationSection section)

Determines whether the section has a Value or has children.

public static string GetConnectionString(this IConfiguration configuration, string name)

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

public static IConfigurationSection GetRequiredSection(this IConfiguration configuration, string key)