Wolf Logan04/30/2020, 6:41 PM
definitions into the common library But in some cases I have types that encapsulate other, platform-specific types.
Casey Brooks04/30/2020, 6:48 PM
Kris Wong04/30/2020, 6:49 PM
Wolf Logan04/30/2020, 6:51 PM
in this context? It's the serialisation that I'm most concerned about tying down, since (historically) our team has had bad experiences with JSON contract drift, and I want to offer them a good solid strategy for success here
Kris Wong04/30/2020, 7:02 PM
pablisco04/30/2020, 8:43 PM
keyword with different implementations if needed. One use case I had was country codes. On my model I had just the code and then the country was resolved to a sealed class with a fallback "Unknown" data class (part of the original sealed class) so I was able to bridge the server dato to something typed. I started originally making custom serializers, but they are not quite there yet for all cases, it was safer to keep things simple 😁 One downside is that the country is resolved at time of usage instead of at time of parsing, however it means that they are lazily initiated so that can also be good, depends on the case. An alternative is to do lazy properties instead of an extension property if it becomes a problem.
Wolf Logan04/30/2020, 8:47 PM
pablisco04/30/2020, 8:56 PM