What rules does Mongo Bson driver use to automap a type?

Viewed 707

When I call this:

BsonClassMap.RegisterClassMap<MyType>();

Under the covers the code calls this:

return RegisterClassMap<TClass>(cm => { cm.AutoMap(); });

And then it's off to mapping land.

I'm trying to figure out what rules are used when reflecting over the type to decide which fields and properties should be serialized/included in the map.

I've tried to reason-thru it by reading the code. I thought someone with more knowledge here could shortcut a full walk-thru in the debugger.

I'd specifically like to know the individual rules used to make a yes/no decision on a type member and the order in which those rules are applied.

0 Answers
Related