I am trying to create a custom configuration section that follows the following recursive structure:
<monitorSettings>
<monitor description="description1" />
<monitor description="description2" />
<monitor description="description3">
<monitor description="description3.1" />
<monitor description="description3.2" />
</monitor>
</monitorSettings>
Is this possible? I am not sure how I would lay out the configuration classes.
I have the following for the monitor:
public class Monitor : ConfigurationElement
{
[ConfigurationProperty("description", IsRequired = true)]
public String Description
{
get
{
return (String)this["description"];
}
set
{
this["description"] = value;
}
}
}
What would I need to add to make it recursive?
try configuration group ConfigurationSectionGroup Class