Thanks Robert, I read that before and it's useful.
The issue is that there is a serious type hierarchy, so I wanted a
more generic way to serialize any class that might come in without
havingto state each class explicitly, but map any of their properties
that are .net data types automatically. I'm doing it right now but am
not happy with the xml serialization. I don't need to query on the
Properties that aren't .net data types necessarily (the ones that are
serialized), but I still need to persist them.
I could perhaps generate the code to do the mappings automatically, or
just use:
if (!BsonClassMap.IsClassMapRegistered(typeof(MyClass))) { //
register class map for MyClass}and cycle through the properties each
time I serialize a new class to make sure I have their Properties
types registered as well.
I imagine I would have to worry about the class dependencies/ordering
I register them in either way.