Implementation of a general-purpose object structure (property bag)
- by Thomas Wanner
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).