I wrote up a quick test to verify that it really worked (of course we
have unit tests for all of this also, but I wanted to test your
scenario specifically).
Here's the program I wrote:
http://www.pastie.org/1931985
I decided it was worth sharing because it illustrates an important
point: before the BsonSerializer can deserialize a particular class
(say Animal) it must have first created a class map for that class
(and in the case of an abstract class like Animal for its known types
as well).
The gotcha is: if the first thing your program does is serialize an
instance of Animal, the class maps are created automatically. But if
the first thing your program does is deserialize an instance of
Animal, you need to make the class known to the serializer first.
Checkout the EnsureKnownTypesAreRegistered helper method. You only
need to inform the serializer of classes it wouldn't otherwise
discover automatically. Element will be discovered automatically
because it is the type of the collection. Cat and Dog will be
discovered automatically when LookupClassMap is called for Animal
because they are known types of Animal.