Reduced the necessary code to achieve gadget generation for MessagePackTypeless #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
After running through some test code today I found that the approach of using a dynamic assembly to generate surrogate types isn't actually necessary. You can simply write the surrogate classes manually and then reference them, even if they're in the same assembly and it'll still work just fine.
I've made the changes as described above and also added MessagePackTypeless and MessagePackTypelessLz4 to the README. In addition I've added them both to the default Base64 behaviour and also included SharpSerializerBinary as that should also be in the same place.
I went back and forth on the pros and cons of continuing to use a dynamic assembly as I figured it reduces clutter in the codebase, since it's only used for generating this payload, however I figured that there may be other serializers that could use the bait-and-switch approach, too. Open to thoughts on this.