IConfigurationExtensions

Provides extension methods for binding configuration sections to objects using JSON property names. Enables configuration binding that respects when mapping configuration keys to object properties.

Syntax

public static class IConfigurationExtensions

Inheritance

Methods

BindWithJsonNames<T>

public static void BindWithJsonNames<T>(this IConfiguration configuration, T instance)
Binds the configuration values to the specified instance using JSON property names for key mapping. This method respects when determining configuration keys, allowing for JSON-style configuration binding with different property naming conventions.

Parameters

  • configuration IConfiguration: The configuration instance to bind from.
  • instance T: The instance to bind the configuration values to.