MarimerLLC / csla

A home for your business logic in any .NET application.
https://cslanet.com
MIT License
1.25k stars 402 forks source link

Add custom serializers to MobileFormatter #4024

Closed rockfordlhotka closed 3 months ago

rockfordlhotka commented 3 months ago

Closes #2531 Closes #1877 Closes #2148

rockfordlhotka commented 3 months ago

Here's a very simple custom serializer so you can see they work:

https://github.com/MarimerLLC/csla/blob/88d55a96b039df15f9867ab6542c0ee446df5609/Source/Csla.test/Serialization/CustomSerializerTests.cs#L109

You do have me rethinking how a type is mapped to a serializer though. Right now I'm doing it with a direct type comparison, not counting inheritance or interfaces. I suppose I could broaden it so a serializer gets registered for types that can be derived from the type in the map?

Right now:

But maybe:

rockfordlhotka commented 3 months ago

@StefanOssendorf I think this is ready for review if you'd like to take a look.