If you want to use the XmlContentSerializer, you must supply an appropriate ITypeResolver instance. Current options are:
Use TypeResolutionTable
Provide a custom implementation of ITypeResolver
It would be nice with an associated ITypeResolver implementation that can scan an assembly and find all types annotated with [XmlRoot] attributes, and pull the associated local and namespace names out of them.
Perhaps it should be an internal class, with a static factory method defined on XmlContentSerializer, in order to signal that this ITypeResolver only makes sense used together with XmlContentSerializer. Another option is to make it a nested public class under XmlContentSerializer.
In any case, it would need an Assembly object as input. It would then scan that Assembly for all matching classes.
If you want to use the
XmlContentSerializer
, you must supply an appropriateITypeResolver
instance. Current options are:TypeResolutionTable
ITypeResolver
It would be nice with an associated
ITypeResolver
implementation that can scan an assembly and find all types annotated with[XmlRoot]
attributes, and pull the associated local and namespace names out of them.Perhaps it should be an internal class, with a static factory method defined on
XmlContentSerializer
, in order to signal that thisITypeResolver
only makes sense used together withXmlContentSerializer
. Another option is to make it a nested public class underXmlContentSerializer
.In any case, it would need an
Assembly
object as input. It would then scan thatAssembly
for all matching classes.