We have a settings file which is basically Xml which we are extending for pluggable modules we are writing and we basically want to use our existing Xml settings but allow extension methods to be written on them. Long story short if we had an Xml file like so:
<Settings>
<SettingsOne Key1_1="Value1"
Key1_2="Value2" />
<SettingsTwo Key2_1="Value1"
Key2_2="Value2" />
</Settings>
How could we load this as an collection of SettingsEntry where SettingsEntry looked like so:
public class SettingsEntry
{
public string Section { get; set; }
public string Key { get; set; }
public string Value { get; set; }
}
Where Section would be "SettingsOne", Key would be "Key1_1" and Value would be "Value1".
Is this even possible or am I going down a dark path?
No comments:
Post a Comment