Search code examples
.netapp-configconfig-designer-csd

.NET CSD Configuration Collection of type 'AddRemoveClearMap': why do children need a key property?


I'm using Configuration Section Designer (CSD) to manage my .NET app.config file structure, and so far I'm lovin' it.

Problem is, I need a collection of items that doesn't lend itself to having a key. This is a list of permissions having a type (User|Group} and a name. There can be several items of the same type and several items of the same name.

It makes sense not to be able to do this using a collection of type BasicMap; but what about AddRemoveClearMap collections? (Ok, the 'map' in AddRemoveClearMap doesn't help, I need list semantics).

This is what CSD says when I try to configure it like this:

The Item Type of this collection does not have a key property.

enter image description here

Any pointers are welcome.

PS. This answer suggests I add a bogus (unique) GUID property to the objects in the collection and use that as the key. I'll try to see if I can bend CSD to allow that.


Solution

  • I talked to the CSD devs, and apparently this feature is being currently implemented, apparently using the idea from the SO post I mentioned in the question.

    The status is being discussed here: http://csd.codeplex.com/discussions/406983