Nyegaard
Nyegaard

Reputation: 1349

ConfigurationElementCollection with two ConfigurationElementCollections children

I'm trying to make a custom .NET configuration that I can load into my application. I would like to have a configuration like the following:

<Custom>
        <DefaultActions> 
            <Controls>
                <Control name="" value="" />
            </Controls>
        </DefaultActions>

        <CustomActions>
            <Controls>
                <Control name="" value="" />
                <Control name="" value="" />
            </Controls>
            <Documents>
                <Document name=""/>
                <Document name=""/>
            </Documents>
        </CustomActions>

        <CustomActions>
            <Controls>
                <Control name="" value="" />
                <Control name="" value="" />
            </Controls>
            <Documents>
                <Document name=""/>
                <Document name=""/>
            </Documents>
        </CustomActions>

    </Custom>

So a collection containing two collections.

Atm I can have one "CustomActions" but I can't figure out how I get more then one or if a collection always have to have a ConfigrationElement as the parent?

Upvotes: 2

Views: 78

Answers (0)

Related Questions