<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.2" />

Microsoft.Extensions.Configuration.ConfigurationBinder

public static class ConfigurationBinder
Static helper class that allows binding strongly typed objects to configuration values.
public static void Bind(this IConfiguration configuration, string key, object instance)

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

public static void Bind(this IConfiguration configuration, object instance)

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

public static void Bind(this IConfiguration configuration, object instance, Action<BinderOptions> configureOptions)

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

public static T Get<T>(this IConfiguration configuration)

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.

public static T Get<T>(this IConfiguration configuration, Action<BinderOptions> configureOptions)

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.

public static object Get(this IConfiguration configuration, Type 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.

public static object Get(this IConfiguration configuration, Type type, Action<BinderOptions> configureOptions)

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.

public static T GetValue<T>(this IConfiguration configuration, string key)

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

public static T GetValue<T>(this IConfiguration configuration, string key, T defaultValue)

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

public static object GetValue(this IConfiguration configuration, Type type, string key)

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

public static object GetValue(this IConfiguration configuration, Type type, string key, object defaultValue)

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