Replies: 1 comment 2 replies
-
I like the idea of alternative configuration syntaxes, especially ones which allow to get rid of string property names and nameof expressions. However, an approach with method calls to configure the mappings would either need isolation and compilation of the given calls or a complex source analysis. Both would probably result in an explosion of the complexity of Mapperly‘s source code. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using
nameof
is fine, but there's a need to specify source and target types every time.What if there were a static class
Map
which coud be used inside static constructor of the mapper class:Source generater can analyze syntax tree and infer the match between properties.
As method is conditional it will be erased as well.
Beta Was this translation helpful? Give feedback.
All reactions