ConfigurationBinder.GetValue Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| GetValue(IConfiguration, Type, String) |
Estrae il valore con la chiave specificata e lo converte nel tipo specificato. |
| GetValue(IConfiguration, Type, String, Object) |
Estrae il valore con la chiave specificata e lo converte nel tipo specificato. |
| GetValue<T>(IConfiguration, String) |
Estrae il valore con la chiave specificata e lo converte nel tipo T. |
| GetValue<T>(IConfiguration, String, T) |
Estrae il valore con la chiave specificata e lo converte nel tipo T. |
GetValue(IConfiguration, Type, String)
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
Estrae il valore con la chiave specificata e lo converte nel tipo specificato.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type, System::String ^ key);
[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? 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);
[<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 GetValue : Microsoft.Extensions.Configuration.IConfiguration * Type * string -> obj
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
Parametri
- configuration
- IConfiguration
Configurazione.
- type
- Type
Tipo in cui convertire il valore.
- key
- String
Chiave del valore della sezione di configurazione da convertire.
Valori restituiti
Valore convertito.
- Attributi
Si applica a
GetValue(IConfiguration, Type, String, Object)
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
Estrae il valore con la chiave specificata e lo converte nel tipo specificato.
public:
[System::Runtime::CompilerServices::Extension]
static System::Object ^ GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, Type ^ type, System::String ^ key, System::Object ^ defaultValue);
[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? 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);
[<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 GetValue : Microsoft.Extensions.Configuration.IConfiguration * Type * string * obj -> obj
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
Parametri
- configuration
- IConfiguration
Configurazione.
- type
- Type
Tipo in cui convertire il valore.
- key
- String
Chiave del valore della sezione di configurazione da convertire.
- defaultValue
- Object
Valore predefinito da utilizzare se non viene trovato alcun valore.
Valori restituiti
Valore convertito.
- Attributi
Si applica a
GetValue<T>(IConfiguration, String)
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
Estrae il valore con la chiave specificata e lo converte nel tipo T.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::String ^ key);
[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? GetValue<T>(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key);
public static T? GetValue<T>(this Microsoft.Extensions.Configuration.IConfiguration configuration, string key);
[<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 GetValue : Microsoft.Extensions.Configuration.IConfiguration * string -> 'T
static member GetValue : Microsoft.Extensions.Configuration.IConfiguration * string -> 'T
<Extension()>
Public Function GetValue(Of T) (configuration As IConfiguration, key As String) As T
Parametri di tipo
- T
Tipo in cui convertire il valore.
Parametri
- configuration
- IConfiguration
Configurazione.
- key
- String
Chiave del valore della sezione di configurazione da convertire.
Valori restituiti
Valore convertito.
- Attributi
Si applica a
GetValue<T>(IConfiguration, String, T)
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
- Origine:
- ConfigurationBinder.cs
Estrae il valore con la chiave specificata e lo converte nel tipo T.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static T GetValue(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::String ^ key, T defaultValue);
[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? 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);
[<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 GetValue : Microsoft.Extensions.Configuration.IConfiguration * string * 'T -> 'T
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
Parametri di tipo
- T
Tipo in cui convertire il valore.
Parametri
- configuration
- IConfiguration
Configurazione.
- key
- String
Chiave del valore della sezione di configurazione da convertire.
- defaultValue
- T
Valore predefinito da utilizzare se non viene trovato alcun valore.
Valori restituiti
Valore convertito.
- Attributi