ConfigurationBinder.GetValue メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| 名前 | 説明 |
|---|---|
| GetValue(IConfiguration, Type, String) |
指定したキーを持つ値を抽出し、指定した型に変換します。 |
| GetValue(IConfiguration, Type, String, Object) |
指定したキーを持つ値を抽出し、指定した型に変換します。 |
| GetValue<T>(IConfiguration, String) |
指定したキーを使用して値を抽出し、T 型に変換します。 |
| GetValue<T>(IConfiguration, String, T) |
指定したキーを使用して値を抽出し、T 型に変換します。 |
GetValue(IConfiguration, Type, String)
指定したキーを持つ値を抽出し、指定した型に変換します。
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
パラメーター
- configuration
- IConfiguration
構成。
- type
- Type
値の変換の対象となる型。
- key
- String
変換する構成セクションの値のキー。
返品
変換された値。
- 属性
適用対象
GetValue(IConfiguration, Type, String, Object)
指定したキーを持つ値を抽出し、指定した型に変換します。
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
パラメーター
- configuration
- IConfiguration
構成。
- type
- Type
値の変換の対象となる型。
- key
- String
変換する構成セクションの値のキー。
- defaultValue
- Object
値が見つからない場合に使用する既定値。
返品
変換された値。
- 属性
適用対象
GetValue<T>(IConfiguration, String)
指定したキーを使用して値を抽出し、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
型パラメーター
- T
値の変換の対象となる型。
パラメーター
- configuration
- IConfiguration
構成。
- key
- String
変換する構成セクションの値のキー。
返品
変換された値。
- 属性
適用対象
GetValue<T>(IConfiguration, String, T)
指定したキーを使用して値を抽出し、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
型パラメーター
- T
値の変換の対象となる型。
パラメーター
- configuration
- IConfiguration
構成。
- key
- String
変換する構成セクションの値のキー。
- defaultValue
- T
値が見つからない場合に使用する既定値。
返品
変換された値。
- 属性