ConfigurationBinder.GetValue Yöntem

Tanım

Aşırı Yüklemeler

GetValue(IConfiguration, Type, String)

Değeri belirtilen anahtarla ayıklar ve belirtilen türe dönüştürür.

GetValue(IConfiguration, Type, String, Object)

Değeri belirtilen anahtarla ayıklar ve belirtilen türe dönüştürür.

GetValue<T>(IConfiguration, String)

Belirtilen anahtarla değeri ayıklar ve T türüne dönüştürür.

GetValue<T>(IConfiguration, String, T)

Belirtilen anahtarla değeri ayıklar ve T türüne dönüştürür.

GetValue(IConfiguration, Type, String)

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

Değeri belirtilen anahtarla ayıklar ve belirtilen türe dönüştürür.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type, System::String ^ key);
public static object GetValue (this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type, string key);
public static object? GetValue (this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type, string key);
static member GetValue : Microsoft.Extensions.Configuration.IConfiguration * Type * string -> obj
<Extension()>
Public Function GetValue (configuration As IConfiguration, type As Type, key As String) As Object

Parametreler

configuration
IConfiguration

Yapılandırma.

type
Type

Değerin dönüştürülecek tür.

key
String

Dönüştürülecek yapılandırma bölümünün değerinin anahtarı.

Döndürülenler

Dönüştürülen değer.

Şunlara uygulanır

GetValue(IConfiguration, Type, String, Object)

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

Değeri belirtilen anahtarla ayıklar ve belirtilen türe dönüştürür.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Object ^ GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type, System::String ^ key, System::Object ^ defaultValue);
public static object GetValue (this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type, string key, object defaultValue);
public static object? GetValue (this Microsoft.Extensions.Configuration.IConfiguration configuration, Type type, string key, object? defaultValue);
static member GetValue : Microsoft.Extensions.Configuration.IConfiguration * Type * string * obj -> obj
<Extension()>
Public Function GetValue (configuration As IConfiguration, type As Type, key As String, defaultValue As Object) As Object

Parametreler

configuration
IConfiguration

Yapılandırma.

type
Type

Değerin dönüştürülecek tür.

key
String

Dönüştürülecek yapılandırma bölümünün değerinin anahtarı.

defaultValue
Object

Değer bulunamazsa kullanılacak varsayılan değer.

Döndürülenler

Dönüştürülen değer.

Şunlara uygulanır

GetValue<T>(IConfiguration, String)

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

Belirtilen anahtarla değeri ayıklar ve T türüne dönüştürür.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::String ^ key);
public static T GetValue<T> (this Microsoft.Extensions.Configuration.IConfiguration configuration, string key);
public static T? GetValue<T> (this Microsoft.Extensions.Configuration.IConfiguration configuration, string key);
static member GetValue : Microsoft.Extensions.Configuration.IConfiguration * string -> 'T
<Extension()>
Public Function GetValue(Of T) (configuration As IConfiguration, key As String) As T

Tür Parametreleri

T

Değerin dönüştürülecek tür.

Parametreler

configuration
IConfiguration

Yapılandırma.

key
String

Dönüştürülecek yapılandırma bölümünün değerinin anahtarı.

Döndürülenler

T

Dönüştürülen değer.

Şunlara uygulanır

GetValue<T>(IConfiguration, String, T)

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

Belirtilen anahtarla değeri ayıklar ve T türüne dönüştürür.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static T GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::String ^ key, T defaultValue);
public static T GetValue<T> (this Microsoft.Extensions.Configuration.IConfiguration configuration, string key, T defaultValue);
public static T? GetValue<T> (this Microsoft.Extensions.Configuration.IConfiguration configuration, string key, T defaultValue);
static member GetValue : Microsoft.Extensions.Configuration.IConfiguration * string * 'T -> 'T
<Extension()>
Public Function GetValue(Of T) (configuration As IConfiguration, key As String, defaultValue As T) As T

Tür Parametreleri

T

Değerin dönüştürülecek tür.

Parametreler

configuration
IConfiguration

Yapılandırma.

key
String

Dönüştürülecek yapılandırma bölümünün değerinin anahtarı.

defaultValue
T

Değer bulunamazsa kullanılacak varsayılan değer.

Döndürülenler

T

Dönüştürülen değer.

Şunlara uygulanır