Skip to content

ISerializer<CustomInheritedClass> #657

@miliante

Description

@miliante

Thank you for the wonders of ExtendedXmlSerializer. I solved many problems (but sometimes it is difficult to find updated docs)

I have classes/interface as follows (to avoid excess code I put only the header of the classes/interface):

public interface IDataElement;
public class ClsArray : ExtendedList<ClsRecord>, IDataElement;
public class ClsItem : IDataElement

when I create a custom public class ClsItemSerializer : ISerializer<ClsItem> for deserialization and register:

            return new ConfigurationContainer()
            .EnableImplicitTyping(typeof(ClsDataRoot), typeof(ClsItem), typeof(ClsArray))
            .Type<ClsItem>().Register().Serializer().Using(new ClsItemSerializer()) //.CustomSerializer(new ClsItemSerializer())
            .Create();

Both ClsArray and ClsItem are caught in the Get method of the custom serializer. Why not only ClsItem? I made some tests and I believe it is because of the interface that is shared by both. But I must keep it as is to allow me to have these classes in the same List. How could I overcome this?

Metadata

Metadata

Assignees

Labels

bug(cc: fix) Something isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions