Class ConfigurationSectionExtensions
Extension methods for registering Tenduke.Core.Config.ConfigurationSection.ConfigurationSectionProvider with TendukeConfigurationBuilder.
public static class ConfigurationSectionExtensions
- Inheritance
-
ConfigurationSectionExtensions
- Inherited Members
Methods
AddConfigurationSection(AsyncTendukeConfigurationBuilder, IConfiguration)
Adds an IConfigurationProvider that reads configuration items from a section of an IConfiguration.
public static AsyncTendukeConfigurationBuilder AddConfigurationSection(this AsyncTendukeConfigurationBuilder builder, IConfiguration configuration)
Parameters
builder
AsyncTendukeConfigurationBuilderThe AsyncTendukeConfigurationBuilder to add to.
configuration
IConfigurationThe IConfiguration already loaded using an IConfigurationBuilder.
Returns
Exceptions
- ArgumentNullException
builder
orconfiguration
wasnull
.
AddConfigurationSection(AsyncTendukeConfigurationBuilder, IConfiguration, string)
Adds an IConfigurationProvider that reads configuration items from a section of an IConfiguration.
public static AsyncTendukeConfigurationBuilder AddConfigurationSection(this AsyncTendukeConfigurationBuilder builder, IConfiguration configuration, string sectionName)
Parameters
builder
AsyncTendukeConfigurationBuilderThe AsyncTendukeConfigurationBuilder to add to.
configuration
IConfigurationThe IConfiguration already loaded using an IConfigurationBuilder.
sectionName
stringName of configuration section to load keys from.
Returns
Exceptions
- ArgumentNullException
builder
,configuration
, orsectionName
wasnull
.- ArgumentException
sectionName
was empty or contained only whitespace.
AddConfigurationSection(TendukeConfigurationBuilder, IConfiguration)
Adds an IConfigurationProvider that reads configuration items from a section of an IConfiguration.
public static TendukeConfigurationBuilder AddConfigurationSection(this TendukeConfigurationBuilder builder, IConfiguration configuration)
Parameters
builder
TendukeConfigurationBuilderThe TendukeConfigurationBuilder to add to.
configuration
IConfigurationThe IConfiguration already loaded using an IConfigurationBuilder.
Returns
Exceptions
- ArgumentNullException
builder
wasnull
orconfiguration
wasnull
.
AddConfigurationSection(TendukeConfigurationBuilder, IConfiguration, string)
Adds an IConfigurationProvider that reads configuration items from a section of an IConfiguration.
public static TendukeConfigurationBuilder AddConfigurationSection(this TendukeConfigurationBuilder builder, IConfiguration configuration, string sectionName)
Parameters
builder
TendukeConfigurationBuilderThe TendukeConfigurationBuilder to add to.
configuration
IConfigurationThe IConfiguration already loaded using an IConfigurationBuilder.
sectionName
stringName of configuration section to load keys from.
Returns
Exceptions
- ArgumentNullException
builder
,configuration
, orsectionName
wasnull
.- ArgumentException
sectionName
was empty or contained only whitespace.