AqlaSolutions / AqlaSerializer

Binary serializer with full .NET support!
http://www.aqla.net
Other
17 stars 3 forks source link

MetaType.AddSubType() returns the same meta type, not the derived metatype for added sub type #14

Closed aienabled closed 2 years ago

aienabled commented 8 years ago

Hello!

MetaType.AddSubType() returns the same meta type, not the derived metatype for added sub type.

This seems misleading. I suppose AqlaSerializer should return derived metatype with which the developer could continue working - adding fields, etc.

Regards!

AqlaSolutions commented 8 years ago

I'm agree with this but since AddSubType already returns MetaType changing which MetaType is returned will break existing code in a way that it won't be noticed at compile time. Do you think it's possible to solve such case?

aienabled commented 8 years ago

You can rename the method to something different - for example, RegisterSubType. So developers who use this method will get a compilation error and go here to read about the changes.

But, since nobody reported it before, I think it might be safe to assume that nobody really used the result of this method. So maybe a simple fix with mention about it in the release notes will be good enough.

Regards!

AqlaSolutions commented 2 years ago

Closing for now since I'm not going to change this behavior in near future