ConfigurationExtensions.AsEnumerable 方法

定义

重载

AsEnumerable(IConfiguration)

获取 中 IConfiguration键值对的枚举。

AsEnumerable(IConfiguration, Boolean)

获取 中的键值对的 IConfiguration枚举。

AsEnumerable(IConfiguration)

Source:
ConfigurationExtensions.cs
Source:
ConfigurationExtensions.cs
Source:
ConfigurationExtensions.cs
Source:
ConfigurationExtensions.cs

获取 中 IConfiguration键值对的枚举。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ AsEnumerable(Microsoft::Extensions::Configuration::IConfiguration ^ configuration);
public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string?>> AsEnumerable (this Microsoft.Extensions.Configuration.IConfiguration configuration);
static member AsEnumerable : Microsoft.Extensions.Configuration.IConfiguration -> seq<System.Collections.Generic.KeyValuePair<string, string>>
<Extension()>
Public Function AsEnumerable (configuration As IConfiguration) As IEnumerable(Of KeyValuePair(Of String, String))

参数

configuration
IConfiguration

要枚举的 IConfiguration

返回

键值对的枚举。

适用于

AsEnumerable(IConfiguration, Boolean)

Source:
ConfigurationExtensions.cs
Source:
ConfigurationExtensions.cs
Source:
ConfigurationExtensions.cs
Source:
ConfigurationExtensions.cs

获取 中的键值对的 IConfiguration枚举。

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Collections::Generic::KeyValuePair<System::String ^, System::String ^>> ^ AsEnumerable(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, bool makePathsRelative);
public static System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string,string?>> AsEnumerable (this Microsoft.Extensions.Configuration.IConfiguration configuration, bool makePathsRelative);
static member AsEnumerable : Microsoft.Extensions.Configuration.IConfiguration * bool -> seq<System.Collections.Generic.KeyValuePair<string, string>>
<Extension()>
Public Iterator Function AsEnumerable (configuration As IConfiguration, makePathsRelative As Boolean) As IEnumerable(Of KeyValuePair(Of String, String))

参数

configuration
IConfiguration

要枚举的 IConfiguration

makePathsRelative
Boolean

true 如果为 ,则从返回的子键中剪裁当前配置的路径;否则为 false

返回

键值对的枚举。

适用于