-
Type: Bug
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: 2.0
-
Component/s: Serialization
-
None
The following Main function will blow up, due to the constructor for ArraySerializer registering a class map for the type before the class map can be registered.
void Main() { BsonClassMap.RegisterClassMap<ModelType>(x => { x.MapMember(y => y.ModelTypes).SetSerializer(new ArraySerializer<ModelType>()); }); } // Define other methods and classes here public class ModelType { public ModelType[] ModelTypes { get; set; } }
- related to
-
CSHARP-1296 StackOverflowException when serializing a class C that implements IEnumerable<C>
- Closed