ConfigurationBinder.Get Method

Definition

Overloads

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

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(IConfiguration, Type)

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

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:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type);
public static object? Get (this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type);
static member Get : Microsoft.Extensions.Configuration.IConfiguration * Type -> obj
<Extension()>
Public Function Get (configuration As IConfiguration, type As Type) As Object

Parameters

configuration
IConfiguration

The configuration instance to bind.

type
Type

The type of the new instance to bind.

Returns

The new instance if successful, null otherwise.

Applies to

Get(IConfiguration, Type, Action<BinderOptions>)

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

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:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureOptions);
public static object? Get (this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureOptions);
static member Get : Microsoft.Extensions.Configuration.IConfiguration * Type * Action<Microsoft.Extensions.Configuration.BinderOptions> -> obj
<Extension()>
Public Function Get (configuration As IConfiguration, type As Type, configureOptions As Action(Of BinderOptions)) As Object

Parameters

configuration
IConfiguration

The configuration instance to bind.

type
Type

The type of the new instance to bind.

configureOptions
Action<BinderOptions>

Configures the binder options.

Returns

The new instance if successful, null otherwise.

Applies to

Get<T>(IConfiguration)

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

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:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration);
public static T? Get<T> (this Microsoft.Extensions.Configuration.IConfiguration configuration);
static member Get : Microsoft.Extensions.Configuration.IConfiguration -> 'T
<Extension()>
Public Function Get(Of T) (configuration As IConfiguration) As T

Type Parameters

T

The type of the new instance to bind.

Parameters

configuration
IConfiguration

The configuration instance to bind.

Returns

T

The new instance of T if successful, default(T) otherwise.

Applies to

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

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

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:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureOptions);
public static T? Get<T> (this Microsoft.Extensions.Configuration.IConfiguration configuration, Action<Microsoft.Extensions.Configuration.BinderOptions>? configureOptions);
static member Get : Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> 'T
<Extension()>
Public Function Get(Of T) (configuration As IConfiguration, configureOptions As Action(Of BinderOptions)) As T

Type Parameters

T

The type of the new instance to bind.

Parameters

configuration
IConfiguration

The configuration instance to bind.

configureOptions
Action<BinderOptions>

Configures the binder options.

Returns

T

The new instance of T if successful, default(T) otherwise.

Applies to