Nested config sections

Posted by Community Admin on 03-Aug-2018 07:54

Nested config sections

All Replies

Posted by Community Admin on 17-Dec-2014 00:00

I want to create a custom config with a top node which expands to my different section nodes.

How do I create that top node and add child sections under it? (I have used Thunder to generate each of my current sections I just now need to create that parent node which will hold all the child sections.

Checking the SF docs the help page is currently a 404.

Darrin

Posted by Community Admin on 18-Dec-2014 00:00

Finally found it

For the child elements add a constructor

public MyElement(ConfigElement parent) : base(parent)

Then ref the child in the parent as

[ConfigurationProperty("My")]

public MyElement Twitter

    get return (MyElement)this["My"];
 

This thread is closed