Configuration Files: how to read them into models?
- by stacker
I have a lot of configuration files in this format:
<?xml version="1.0" encoding="utf-8"?>
<XConfiguration>
<XFile Name="file name 1" />
<XFile Name="name2" />
<XFile Name="name3" />
<XFile Name="name4" />
</XConfiguration>
I want to use ConfigurationRepository.Get to get this object populated:
public class XConfiguration
{
public XFile[] Files { get; set; }
}
I wonder what is the best way to do that. LinqToXml? I don't think ConfigurationManager is a smart option for this.