42 lines
973 B
C#
42 lines
973 B
C#
|
using System.Collections.Generic;
|
|||
|
using System.Collections.ObjectModel;
|
|||
|
namespace ReflectiveConfiguration
|
|||
|
{
|
|||
|
|
|||
|
public class ConfigurationSection
|
|||
|
{
|
|||
|
private Dictionary<string, object> values = new Dictionary<string, object>();
|
|||
|
public string Name { get; private set; }
|
|||
|
public Configuration Configuration { get; private set; }
|
|||
|
|
|||
|
public ConfigurationSection(Configuration configuration)
|
|||
|
: this(configuration,null)
|
|||
|
{
|
|||
|
}
|
|||
|
|
|||
|
public ConfigurationSection(Configuration configuration,string name)
|
|||
|
{
|
|||
|
this.Name = name;
|
|||
|
}
|
|||
|
|
|||
|
public object this[string key]
|
|||
|
{
|
|||
|
get {
|
|||
|
return this.values[key];
|
|||
|
}
|
|||
|
set {
|
|||
|
this.values[key] = value;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
public Dictionary<string,object>.KeyCollection Keys {
|
|||
|
get {
|
|||
|
return this.values.Keys;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
}
|