Interface IManager<T>
Defines basic configuration manager methods
Namespace: RadLibrary.Configuration
Assembly: RadLibrary.dll
Syntax
public interface IManager<T>
where T : IConfigurationSection
Type Parameters
Name | Description |
---|---|
T | The configuration section |
Properties
| Improve this Doc View SourceItem[String]
Get or set section by its key
Declaration
[NotNull]
T this[[NotNull] string key] { get; set; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key |
Property Value
Type | Description |
---|---|
T |
Sections
All root sections
Declaration
[ItemNotNull]
IEnumerable<T> Sections { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T> |
Methods
| Improve this Doc View SourceEnsureScheme(Type)
Ensure config scheme
Declaration
void EnsureScheme([NotNull] Type type)
Parameters
Type | Name | Description |
---|---|---|
System.Type | type | The config scheme |
GetSection(String)
Get section by key
Declaration
T GetSection([NotNull] string section)
Parameters
Type | Name | Description |
---|---|---|
System.String | section | The key |
Returns
Type | Description |
---|---|
T | The section |
Load()
Load configuration in memory
Declaration
void Load()
Save()
Save configuration
Declaration
void Save()
SetSection(String, T)
Set section by key
Declaration
void SetSection([NotNull] string key, [NotNull] T section)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key |
T | section | The section |