ConfigurationBinder.Bind Method

Definition

Overloads

Bind(IConfiguration, Object)

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

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, 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.

Bind(IConfiguration, Object)

Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs

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

C#
public static void Bind(this Microsoft.Extensions.Configuration.IConfiguration configuration, object? instance);

Parameters

configuration
IConfiguration

The configuration instance to bind.

instance
Object

The object to bind.

Applies to

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)

Bind(IConfiguration, Object, Action<BinderOptions>)

Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs

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

C#
public static void Bind(this Microsoft.Extensions.Configuration.IConfiguration configuration, object? instance, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureOptions);

Parameters

configuration
IConfiguration

The configuration instance to bind.

instance
Object

The object to bind.

configureOptions
Action<BinderOptions>

Configures the binder options.

Applies to

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)

Bind(IConfiguration, String, Object)

Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs
Source:
ConfigurationBinder.cs

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

C#
public static void Bind(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key, object? instance);

Parameters

configuration
IConfiguration

The configuration instance to bind.

key
String

The key of the configuration section to bind.

instance
Object

The object to bind.

Applies to

.NET 10 (package-provided) ja muud versioonid
Toode Versioonid
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Standard 2.0 (package-provided)