Class KeyValueSettings
- Namespace
- Arc4u.Configuration
- Assembly
- Arc4u.Configuration.dll
Base class for IKeyValueSettings implementations that read all the children of a configuration section as string values.
public abstract class KeyValueSettings : IKeyValueSettings
- Inheritance
-
KeyValueSettings
- Implements
- Derived
- Inherited Members
Constructors
KeyValueSettings(string, IConfiguration)
Initializes a new instance of the KeyValueSettings class from a configuration section. When the section does not exist, the settings are empty.
public KeyValueSettings(string sectionName, IConfiguration configuration)
Parameters
sectionNamestringThe name of the section whose children are read.
configurationIConfigurationThe configuration that contains the section.
Properties
Values
Gets the settings as a read-only dictionary of keys and values.
public IReadOnlyDictionary<string, string> Values { get; }