-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.9.1
-
Component/s: Serialization
-
Labels:None
If I try do the following:
[BsonRepresentation(BsonType.ObjectId)] public ReadOnlyCollection<string> References { get; private set; }
I get an exception when registering the class:
System.NotSupportedException: A serializer of type 'ReadOnlyCollectionSerializer<String>' is not configurable using an attribute of type 'BsonRepresentationAttribute'
I suspect this is because the ReadOnlyCollectionSerializer does not implement the IChildSerializerConfigurable interface, unlike most other collection serializers. Is there a reason for this?