Implementation of a general-purpose object structure (property bag)

Posted by Thomas Wanner on Stack Overflow See other posts from Stack Overflow or by Thomas Wanner
Published on 2010-01-27T16:49:26Z Indexed on 2010/04/03 8:13 UTC
Read the original article Hit count: 457

We need to implement some general-purpose object structure, much like an object in dynamic languages, that would give us a possibility of creating the whole object graph on-the-fly. This class has to be serializable and somehow user friendly.

So far we have made some experiments with class derived from Dictionary<string, object> using the dot notation path to store properties and collections in the object tree. We have also find an article that implements something similar, but it doesn't seem to fit completely into our picture either.

Do you know about some good implementations / libraries that deal with a similar problem or do you have any (non-trivial) ideas that could help us with our own implementation ?

Also, I probably have to say that we are using .NET 3.5, so we can't take advantage of the new features in .NET 4.0 like dynamic type etc. (as far as I know it's also not possible to use any subset of it in .NET 3.5 solution).

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET