Class ConfigurationSection
- Namespace
- Acuit.Pinpoint.Configuration
- Assembly
- Acuit.Pinpoint.Configuration.dll
Represents a section of application configuration values.
public class ConfigurationSection : IConfigurationSection, IConfiguration
- Inheritance
-
ConfigurationSection
- Implements
- Inherited Members
- Extension Methods
Constructors
ConfigurationSection(ConfigurationRoot, string)
Initializes a new instance.
public ConfigurationSection(ConfigurationRoot root, string path)
Parameters
root
ConfigurationRootThe configuration root.
path
stringThe path to this section.
Properties
this[string]
Gets or sets the value corresponding to a configuration key.
public string this[string key] { get; set; }
Parameters
key
stringThe configuration key.
Property Value
- string
The configuration value.
Key
Gets the key this section occupies in its parent.
public string Key { get; }
Property Value
Path
Gets the full path to this section from the IConfigurationRoot.
public string Path { get; }
Property Value
Value
Gets or sets the section value.
public string Value { get; set; }
Property Value
Methods
GetChildren()
Gets the immediate descendant configuration sub-sections.
public IEnumerable<IConfigurationSection> GetChildren()
Returns
- IEnumerable<IConfigurationSection>
The configuration sub-sections.
GetReloadToken()
Returns a IChangeToken that can be used to observe when this configuration is reloaded.
public IChangeToken GetReloadToken()
Returns
GetSection(string)
Gets a configuration sub-section with the specified key.
public IConfigurationSection GetSection(string key)
Parameters
key
stringThe key of the configuration section.
Returns
Remarks
This method will never return null. If no matching sub-section is found with the specified key, an empty IConfigurationSection will be returned.