ConfigurationExtensions.GetRequiredSection(IConfiguration, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a configuration subsection with the specified key.
public:
[System::Runtime::CompilerServices::Extension]
static Microsoft::Extensions::Configuration::IConfigurationSection ^ GetRequiredSection(Microsoft::Extensions::Configuration::IConfiguration ^ configuration, System::String ^ key);
public static Microsoft.Extensions.Configuration.IConfigurationSection GetRequiredSection (this Microsoft.Extensions.Configuration.IConfiguration configuration, string key);
static member GetRequiredSection : Microsoft.Extensions.Configuration.IConfiguration * string -> Microsoft.Extensions.Configuration.IConfigurationSection
<Extension()>
Public Function GetRequiredSection (configuration As IConfiguration, key As String) As IConfigurationSection
Parameters
- configuration
- IConfiguration
The configuration to enumerate.
- key
- String
The key of the configuration section.
Returns
Exceptions
There is no section with key key
.
Remarks
If no matching sub-section is found with the specified key, an exception is raised.
Applies to
Dolgozzon együtt velünk a GitHubon
A tartalom forrása a GitHubon található, ahol létrehozhat és áttekinthet problémákat és lekéréses kérelmeket is. További információért tekintse meg a közreműködői útmutatónkat.