ConfigurationBinder.Get Methode

Definitie

Overloads

Name Description
Get(IConfiguration, Type)

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

Get(IConfiguration, Type, Action<BinderOptions>)

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

Get<T>(IConfiguration)

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

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

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

Get(IConfiguration, Type)

Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")]
public static object? Get(this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type);
public static object? Get(this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")>]
static member Get : Microsoft.Extensions.Configuration.IConfiguration * Type -> obj
static member Get : Microsoft.Extensions.Configuration.IConfiguration * Type -> obj
<Extension()>
Public Function Get (configuration As IConfiguration, type As Type) As Object

Parameters

configuration
IConfiguration

Het configuratie-exemplaar dat moet worden verbonden.

type
Type

Het type van het nieuwe exemplaar dat moet worden verbonden.

Retouren

Het nieuwe exemplaar als dit lukt, null anders.

Kenmerken

Van toepassing op

Get(IConfiguration, Type, Action<BinderOptions>)

Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureOptions);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")]
public static object? Get(this 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);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")>]
static member Get : Microsoft.Extensions.Configuration.IConfiguration * Type * Action<Microsoft.Extensions.Configuration.BinderOptions> -> obj
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

Het configuratie-exemplaar dat moet worden verbonden.

type
Type

Het type van het nieuwe exemplaar dat moet worden verbonden.

configureOptions
Action<BinderOptions>

Hiermee configureert u de binderopties.

Retouren

Het nieuwe exemplaar als dit lukt, null anders.

Kenmerken

Van toepassing op

Get<T>(IConfiguration)

Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")]
public static T? Get<T>(this Microsoft.Extensions.Configuration.IConfiguration configuration);
public static T? Get<T>(this Microsoft.Extensions.Configuration.IConfiguration configuration);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")>]
static member Get : Microsoft.Extensions.Configuration.IConfiguration -> 'T
static member Get : Microsoft.Extensions.Configuration.IConfiguration -> 'T
<Extension()>
Public Function Get(Of T) (configuration As IConfiguration) As T

Type parameters

T

Het type van het nieuwe exemplaar dat moet worden verbonden.

Parameters

configuration
IConfiguration

Het configuratie-exemplaar dat moet worden verbonden.

Retouren

T

Het nieuwe exemplaar van T als dit is gelukt, standaard(T) anders.

Kenmerken

Van toepassing op

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

Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs
Bron:
ConfigurationBinder.cs

Probeert het configuratie-exemplaar te binden aan een nieuw exemplaar van het type T. Als deze configuratiesectie een waarde heeft, wordt deze gebruikt. Anders binding door overeenkomende eigenschapsnamen op basis van configuratiesleutels recursief.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T Get(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Action<Microsoft::Extensions::Configuration::BinderOptions ^> ^ configureOptions);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")]
public static T? Get<T>(this 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);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("Binding strongly typed objects to configuration values requires generating dynamic code at runtime, for example instantiating generic types.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("In case the type is non-primitive, the trimmer cannot statically analyze the object's type so its members may be trimmed.")>]
static member Get : Microsoft.Extensions.Configuration.IConfiguration * Action<Microsoft.Extensions.Configuration.BinderOptions> -> 'T
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

Het type van het nieuwe exemplaar dat moet worden verbonden.

Parameters

configuration
IConfiguration

Het configuratie-exemplaar dat moet worden verbonden.

configureOptions
Action<BinderOptions>

Hiermee configureert u de binderopties.

Retouren

T

Het nieuwe exemplaar van T als dit is gelukt, standaard(T) anders.

Kenmerken

Van toepassing op