Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ConfigurationBinder Class

Definition

Namespace:
Microsoft.Extensions.Configuration
Assembly:
Microsoft.Extensions.Configuration.Binder.dll
Package:
Microsoft.Extensions.Configuration.Binder v11.0.0-preview.5.26302.115
Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Static helper class that allows binding strongly typed objects to configuration values.

public ref class ConfigurationBinder abstract sealed
public static class ConfigurationBinder
type ConfigurationBinder = class
Public Module ConfigurationBinder
Inheritance
ConfigurationBinder

Remarks

For more information and examples, see Binding.

Methods

Name Description
Bind(IConfiguration, Object, Action<BinderOptions>)

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

Bind(IConfiguration, Object)

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

Bind(IConfiguration, String, Object)

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

Get(IConfiguration, Type, Action<BinderOptions>)

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.

Get(IConfiguration, 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.

Get<T>(IConfiguration, Action<BinderOptions>)

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.

Get<T>(IConfiguration)

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.

GetValue(IConfiguration, Type, String, Object)

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

GetValue(IConfiguration, Type, String)

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

GetValue<T>(IConfiguration, String, T)

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

GetValue<T>(IConfiguration, String)

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

Applies to


Feedback

Was this page helpful?